An unhinged homeless woman shoved a complete stranger onto the subway tracks early Friday morning in Manhattan, police said.

The 27-year-old man was walking toward the south end of the Q train platform at 14th Street-Union Square station when Marjorie Chambers, 57, suddenly pushed him onto the roadbed just after midnight.

Chambers told police the Queens man was walking on the yellow safety strip at the edge of the platform when he passed in front of her, prompting her to shove him.

She claimed the victim was bothering her, cops said, but police sources told The Post the attack was unprovoked.

The victim was removed from the tracks before any trains arrived. He refused treatment at the scene, police said.

Chambers was arrested at the corner of East 14th Street and Union Square West and taken to NYC Health + Hospitals/Bellevue for evaluation. She was charged with reckless endangerment for the unprovoked attack, the sources said.

The woman has two prior arrests, including for an assault in 1995, when she allegedly stabbed someone with scissors, sources said.