Medina had apparently told Sandoval to leave after seeing him sleeping in his car two weeks earlier.
Investigators say Medina doused Sandoval's shopping cart with gas and set it on fire with a match. Some of the gasoline splashed onto Sandoval, causing his beard to catch fire.
Sandoval suffered second and third degree burns to his body, face, and hands. All of his possessions were destroyed.
Prosecutors say Medina was arrested near his home a short time later after a co-worker called 911.
City News Service contributed to this report.