Williams yelled and clenched her fists after a backhand volley winner gave her the first set, 7-5, against Monica Niculescu of Romania. The crowd warmly applauded her, with the stadium eventually filling up as the match went on.
Williams had played just one Fed Cup match since winning her 19th Grand Slam title at the Australian Open in January. She looked rusty and kept a serious demeanour except for occasional displays of emotion when she started winning points.
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.
"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.
The 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.
Williams' mother Oracene, sister Isha, her coach and agent watched as Williams fell behind 2-0, winning just one point on her serve to open the second-round match.
Williams needed seven deuces to hold trailing 2-1, committing a slew of errors and facing three break points before Niculescu's backhand went wide on an 84-degree evening in the desert.
A smattering of "Go Serena" shouts rang out before Williams broke back at 2-all.
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 was wildly inconsistent, double-faulting away one game before serving out another at love.
A small group of fans waited near an entrance gate in the hours beforehand, with one of holding a hand-lettered sign that read "Welcome back Serena."
"I'm looking forward to stepping out on centre court and letting the whole world know that it doesn't matter what you face, if it's something that wasn't right, hurt you, hurt your family, you can just come out and be strong and say, 'I'm still going to be here, I'm still going to survive and I'm still going to be the best person I can be,'" Williams said Thursday.
Williams is 14-1 with two titles to her credit in three previous appearances in the desert.
In earlier matches, No. 3 seed Simona Halep beat qualifier Dana Gavrilova 2-6, 6-1, 6-2 and No. 8 Ekaterina Makarova routed Elena Vesnina 6-4, 6-0.
Williams' match was one of 11 involving Americans, with four advancing early on.
Sloane Stephens upset 13th-seeded Angelique Kerber 7-6 (6), 6-2 in second-round play.
On the men's side, Donald Young, Steve Johnson and Jack Sock advanced to the second round. Young defeated Pablo Carreno Busta 6-3, 6-4, Johnson beat Marcel Granollers 6-2, 6-3 and Sock got by Yen-Hsun Lu 6-7 (4), 6-2, 7-5.
Losing were Alison Riske, who was beaten 6-3, 6-1 by seventh-seeded Agnieszka Radwanska, and Sam Querrey, who lost to Sergiy Stakhovsky 6-2, 4-6, 6-2.
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, although she and the sisters' parents are supportive of Serena's return. In 2001, her father Richard 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.Suggest a correction