The stabbing was reported around 9:30 p.m. at the Vincent Grade train station in Acton.
Deputies with the Los Angeles County Sheriff's Department said the guard was able to stop the suspect with pepper spray. The guard wasn't seriously injured.
The incident caused a brief delay for riders.
Metrolink announced on social media that the Antelope Valley Line 285 to Lancaster was on hold due to police activity and offered riders $50 to use for alternative transportation. It was reported at 10:57 p.m. that the train was moving again.
No other injuries were reported.
This comes less than a week after a Metro bus was hijacked in Los Angeles and a passenger was shot and killed.