Williams, who won her first Wimbledon title in 2002, found it hard to cope with the fast-moving Halep, making a total of 26 unforced errors against three by her rival.
Halep fell on her knees with her arms raised to the sky in celebration. It was just her second victory over the 23-time Grand Slam champion in 11 meetings. The first one came in 2014.
"It was the best match I have ever played. I had nerves. My stomach wasn't well before I came out on court. But I just concentrated on doing my best. It was my mum's dream. She said when I was 10 that if I want to do something in tennis, it is to play in the Wimbledon final," Halep said.
"I have changed my game a bit to win more matches on grass and this year I felt that I could do more with the ball. I cannot wait to get back next year," she said in front of a packed crowd in the Centre Court.
Williams, seeded 11th this year, said, "She (Halep) literally played out of her mind. When a player plays that amazing, then you have to take your hat off and say well done. I've got to keep trying, keep fighting and enjoying the sport," the American said.