Some countries may require otherwise free citizens moving abroad from their country of citizenship to get a no objection approval to legally depart. Former UK colonies in Asia have had a history of this as did a former US colony in Asia.
Some countries may deny passports to otherwise free citizens for even civil debts, in some cases even private debts. Some former British colonies now in the GCC countries come to mind.
Some countries generally require their otherwise free citizens to have a passport in order to use common carriers to get out of the country. The US comes to mind as taking this approach, but so too do a variety of former British colonies.
It seems that many a country with any sort of exit controls does at least sometime prevent its own citizens from freely leaving. The exceptions are diminishing, in large part due to "security" and "cooperation".