The new policies, laid out in US State Department cables sent on Tuesday, are the latest example of President Donald Trump's effort to crack down on immigrants who are in the country illegally.
In each case, there are exceptions for those who apply for visas from outside their countries, as well as exceptions on humanitarian grounds or for travel "deemed in the interest of the United States".
The new rules, which go into effect on Wednesday, do not affect visas that have already been granted.
The cables, sent by Secretary of State Rex Tillerson to consular officials around the world, said the four countries were "denying or unreasonably delaying" the return of their citizens from the US, and that visa restrictions would be lifted in a country if it accepted its deportees.
The State Department declined comment on the cables, saying it would not discuss internal communications.
The visa sanctions vary in severity, with Eritrea facing the harshest. Any Eritreans who applied in their own country for most US business or tourist visas to the United States would be rejected, the cables said.
In Guinea, the United States would no longer issue a range of tourist, business and student visas to government officials and their immediate family members who applied from inside the country, another cable said.
In Cambodia, the sanction is tailored. Only Foreign Ministry employees at or above the rank of director general, and their families, who applied inside the country would be barred from getting some visas for personal travel, a third cable said.
For Sierra Leone, only Foreign Ministry and immigration officials would be denied tourist and business visas at the US Embassy in Freetown, according to a fourth cable.
Visa sanctions are allowed by US immigration law to punish countries that refuse to accept their citizens back from the United States.
In practice, the US has rarely taken that step - just twice in the past decade and a half, according to a Department of Homeland Security spokesman.
The most recent instance was in October 2016 when the Obama administration stopped issuing visas to Gambian government officials and their families because the government was not taking back US deportees from Gambia.
Three of the four countries included in the current visa restrictions were on a list of nations deemed "recalcitrant" by US immigration authorities in July. It not immediately clear why Sierra Leone, which did not appear on that list, was also included in the sanctions.
Other countries on the list included China, Cuba, Vietnam, Laos, Iran, Burma, Morocco, Hong Kong and South Sudan.
Acting Department of Homeland Security Secretary Elaine Duke sent a letter to the State Department last month identifying the four countries as ones that could face penalties.
Department of Homeland Security officials said that in some cases, the agency had no choice but to release convicted criminals who served prison time but could not be returned to their home country because it refused to take them back.
The Trump administration has made it a priority to pressure reluctant countries to take back their citizens.
According to congressional testimony by former assistant secretary of state for consular affairs Michele Bond in 2016, Cuba was the "most recalcitrant country on repatriation of its nationals", although she did not give numbers.