Understanding what Rousseau meant when he said that people should be "forced to be free," begins with recongizing that by entering into civil society people gain civil freedom—which is unavailable to them in the state of nature. This freedom is characterized by an ability to be rational and moral.
According to Rousseau, this freedom is only possible by agreeing to the social contract, becoming a part of the sovereign, and obeying the general will as expressed in the laws. People who break the law or violate the social contract are violating the very institution that has made their freedom possible. Therefore, by forcing people to obey the social contract and the laws, the state would only be forcing people to be hold on to the civil freedom that makes them fully human.
Put another way, the state would be "forcing" criminals to be "free."