It's all about your Karma. It is your job to do want you ought to de in live if you have a responsibility to carry out a certain duty, and you don't do it, then you are bound to have bad Karma. Thus, you are not free. Until you complete all of your duties in life with good Karma, you'll just be stuck in samsara until you get your act together. That is not freedom so this is why Hinduism can say that you can be free by fulfilling your duties.
Freedom is the right to do what one wants to a certain degree, but within good moral judgment.
Freedom is a word we use in America to describe certain things that we are allowed to do. Hinduism maintains that if you fulfill your duty you will reach a state of good karma that will give a freedom from worries. We can be free of the hassles that plague our minds. Our society doesn't grasp this concept. We constantly are holding out our hands after we have fulfilled our duty looking for its reward.