Williams defeated Monica Niculescu 7-5, 7-5 Friday night in a wildly inconsistent performance that included 48 unforced errors and 12 aces.
Williams rallied from a 5-3 deficit in the first set and recovered after blowing three leads in the second set, finally winning on her fourth match point in her first tournament since earning her 19th Grand Slam title at the Australian Open in January.
"I feel like the nerves have kind of gone away," she said. "I'm glad I was able to do this. It definitely feels like one of the biggest and one of the proudest moments of my career."
A serious-looking Williams walked onto the court wearing headphones, then slipped them off and raised her right arm to acknowledge the sustained applause as she was introduced.
"But up until that moment I didn't really know if it was the right thing for me to do. I feel like that's when I felt it was the right thing," she said. "And receiving the love from the crowd here, it really meant a lot to me."
The world's top-ranked women's player had stayed away from the BNP Paribas Open since winning the 2001 title as a 19-year-old, getting booed by the fans for what happened a day earlier, when she was to play older sister Venus in a semifinal and Venus withdrew because of injury 20 minutes before the start.
A young black girl waved a sign reading "Straight Outta Compton," the Los Angeles suburb where the Williams sisters first learned tennis from father Richard.
"I feel like I've already won this tournament. I don't feel like I have to actually hold the trophy at the end of this," Williams said. "I feel like I'm already holding up a trophy. I have never felt that way before. Just being here is a huge win. Not only for me, but for so many people. It's a wonderful feeling."
Williams closed out the 2-hour match when Niculescu netted a backhand volley. After a quick handshake, Williams waved to the crowd, but there was none of the jumping and pirouetting that often marks her victories.
"We love you, Serena!" a male fan bellowed during the coin toss at the net. Billionaire Larry Ellison, who owns the tournament, was on his feet applauding Williams as she jogged to the baseline near his seat for the warmup. He was later joined by John McEnroe and billionaire Bill Gates.
Niculescu, ranked 68th in the world, was affected by the reception, too.
"I'm happy the crowd was really nice," she said.
Williams had played just one Fed Cup match since winning in Australia and her rustiness showed. On her third match point, she netted a backhand return of Niculescu's 79-mph serve. She had two match points on Niculescu's serve in the 10th game, committing unforced errors both times, including a backhand she had plenty of time to make.
Williams' mother Oracene, sister Isha, her coach and agent watched as Williams fell behind 2-0 in the opening set of the second-round match.
Niculescu used her wicked topspin to blunt Williams' power game, taking a 5-3 lead. Williams held at love before winning the last two games to take the first set, in which there were five service breaks. Williams double-faulted away one game before serving out another at love.
"I've never played anyone like her before. She's obviously an unbelievable fighter," Williams said. "She really made me work really hard. It was good to have a really, really tough match."
A small group of fans waited near an entrance gate in the hours beforehand, with one holding a hand-lettered sign that read "Welcome back Serena."
Williams is 15-1 with two titles to her credit in three previous appearances in the desert.
"Even though things were weird and tough, I was able to do the work," she said. "I'm just pleased about that."
Williams' match was one of 11 involving Americans, with six advancing and five losing.
Sloane Stephens upset 13th-seeded Angelique Kerber 7-6 (6), 6-2 in second-round play and Varvara Lepchenko defeated fellow American Sachia Vickery, 6-4, 6-1.
On the men's side, Donald Young, Steve Johnson and Jack Sock advanced to the second round.
Williams' return was welcomed by tournament officials, although the event had hardly stagnated in her absence. It is one of the best attended outside of the four Grand Slam events, with close to 450,000 expected through the gates during the two weeks.
Venus Williams hasn't changed her mind about boycotting Indian Wells. In 2001, Richard Williams said he heard racial taunts from the crowd, and there was speculation that he dictated which sister would win their meetings.
Now 33, Serena said it wasn't one thing in particular that brought her back to the tournament that she had vowed she would never play again.
"Everyone in general has come a really long way," she said. "Everyone, especially the WTA, USTA, they really step up to the plate. I really appreciate all the love, not just for me, but for a lot of other players that they show."Suggest a correction