The United States has threatened to impose sanctions on Somalis who stand in the way of UN-supervised roadmap for peace in Somalia.
He said his trip to Mogadishu was to acknowledge "significant progress" made against al-Shaabab militants.
However, the al-Qaeda group still controls much of the country.
The BBC's Gabriel Gatehouse, in Mogadishu, says the US envoy was in and out of the Somali capital in a matter of hours on Sunday, but during his key visit he met the Somali president, prime minister and other members of the Transitional Federal Government.
Carson said the US would impose sanctions on anyone standing in the way of the political process now under way.
"The kind of action we must take against spoilers range from visa sanctions to travel sanctions to asset freezes," Carson said.
"There is a level of vulnerability for all of those who might be spoilers."
Carson said the US would consider stationing officials in the capital permanently "when we believe that it is both appropriate and safe".