During a 53 minute rout, British No.1 Johanna Konta, ranked 48th in the world, won 12 games in a row including two service games to love in the second set to progress to the second round in San Jose.
Konta, who was a career-high No.4 in the world last year, becomes the first Briton to beat Williams.
Williams, a 23-time grand slam champion who only returned to the tour from maternity leave earlier this year, served seven double faults and made 25 unforced errors in, according to the WTA, the most one-sided loss of her career.
Since turning professional in 1995, the 36-year-old Williams had never before lost a match without winning at least two games.
Konta said in an on-court interview that Serena obviously wasn’t playing anywhere near her best level but I was just trying to play the match on my terms and do what I can out here and put aside the incredible champion she is and play the player on the day,”
Also speaking after the game, Serena said: ‘I think she played well in the second set and I think I wasn’t sharp at all in the first set and she got confident and she clearly ran away with it,’