He was born in San Ramon, Alajuela, to Don Juan Vicente Acosta and Doña Jesus García.
After a 1917 coup by the brothers Federico Tinoco and Joaquin Tinoco, Acosta escaped to El Salvador, but led a counter-revolution, entering San Jose on September 13, 1919. He was elected president on December 7.
In 1921 he nearly went to war with Panama over a border dispute, which ended with intervention (including the landing of troops) by the United States.