The French Open champion and world number one was far from her best at Flushing Meadows and slumped to a 6-2 6-4 defeat in less than 80 minutes to ensure history in the first match at the new Louis Armstrong Stadium.
Halep becomes the first number-one ranked woman to lose in the first round of the US Open, with world number 44 Kanepi picking up one of the biggest wins of her career.
Kanepi won five games in a row to race into a commanding lead in the opening set before serving it out to love with her first set point, and it was a similar story in the second.
The Estonian won the opening three games of the final set and, while Halep recovered from two breaks down to level it up at 4-4, Kanepit then broke for a fifth time in the match to seal the 6-4 triumph.
Kanepi will now face Jil Teichmann in the second round at Flushing Meadows.