An ex-con who served state prison time for a Manhattan robbery that left a man shot in the face is now charged with fatally stabbing a man outside a Brooklyn homeless shelter.

Police on Thursday arrested Rickie Drawhorn, 38, charging him in the Feb. 25 murder of 21-year-old Miguel Acosta.

Acosta and Drawhorn exchanged words outside the Atlantic Armory Shelter at Bedford and Atlantic Aves. in Crown Heights moments before the stabbing, cops said.

Drawhorn plunged a knife into Acosta’s chest, cops said. The younger man limped a half-block, gasping “My bad! my bad!” as he collapsed, a witness said. He died at Interfaith Medical Center.

The victim lived in a different shelter on Blake Ave. in Brooklyn.

Drawhorn, who was released from prison in October 2012, is charged with murder and criminal possession of a weapon.

He was sentenced to eight to 16 years behind bars in 1997 for assault, after he took part in a New Year’s Eve 1996 robbery that ended with the 31-year-old victim shot in the face, police sources said. Drawhorn, who was 16 years old a the time, was initially charged with attempted murder in that case, sources said.