Yes, a Formula 1 car has won the 24 Hours of Le Mans. JJ Lehto, Yannick Dalmas, and Masanori Sekiya won the 1995 24 Hours of Le Mans while driving the McLaren F1 GTR.