He placed his head on the subway tracks and waited for an oncoming train to take his life.

A distraught man left a suicide note on a Brooklyn platform and then committed suicide in gruesome fashion — with a train decapitating him as it barreled into the station Wednesday.

Police found Rubin Antonio Rodriguez’s headless body at Carroll Gardens’ elevated Smith and Ninth streets station on the F and G lines at around 2:40 a.m., sources said.

The train operator told cops he tried to stop when he spotted the 20-year-old’s head lying in his path, but it was too late.

Before Rodriguez jumped down onto the tracks, he left his cell phone – on which he penned a suicide note – on the platform.

Additional reporting by Natalie Musumeci