Sgt Gary Stein will receive an other-than-honourable discharge for violating a policy that limits speech of military service members, the Marine Corps said.
The action means Sgt Stein, who served nearly 10 years in the Marine Corps, will lose all benefits.
He had argued that his comments were covered by his constitutional right to freedom of speech.
Sgt Stein had put a disclaimer on Facebook that his opinions, which included calling President Obama an enemy, were his own.
He had put Mr Obama's face on mocked-up film posters, including one for the movie Jackass.
A disciplinary board recommended earlier this month that he be given an "other-than-honourable" discharge.
The panel heard he had said he would not follow orders from the president if it involved violating the rights of US citizens.
Prosecutors said Sgt Stein repeatedly ignored warnings from superior officers, and that the postings were in breach of military regulations.
The US military has a long-standing policy of restricting the free speech of service members, including criticism of the president, who is commander-in-chief of America's armed forces.
Sgt Stein's supporters - who include two congressmen, and the American Civil Liberties Union - argued that the defence department's regulations are vague, and that commanders do not understand them.