Costa Rica, which progressed to the quarter-finals four years ago in Brazil, claimed just one point as it was eliminated from Group E in Russia.
Ramirez, who took over in August 2015, revealed after the 2-2 draw with Switzerland on June 27 that he was unsure of his future, and Fedefutbol president Rodolfo Villalobos confirmed on Wednesday that the 53-year-old will not continue in the role.
"Oscar Ramirez's contract is not going to be renewed," Villalobos said.
"After the match in Switzerland we talked internally in the delegation and we are clear that at that moment our process started towards Qatar 2022.
"I guarantee that Costa Rica will be in Qatar 2022."