This rebel had a cause in Queens.

Tragic Hollywood legend James Dean had a girlfriend in Forest Hills — and a love letter he wrote to her just sold at auction for $32,500.

His 1954 missive to actress Barbara Glenn, complete with its original envelope and photo of his pet horse, were part of RR Auction’s Remarkable Rarities sale on Sept 20.

The two-page love letter was written a year before the simmering “Rebel Without a Cause” actor died in a car accident at the age of 24.

“Given his tragically short life, handwritten letters from James Dean are extremely rare,” Bobby Livingston, executive vice president at RR Auction, told The Post.

“What makes this one so special is that it’s a personal note from Hollywood to his girlfriend — an intimate glimpse of James Dean the person, not just

See Full Page