The star All Blacks midfielder became the first New Zealand player in 50 years to receive a red card, sent off by referee Jerome Garces in his side's 24-21 second-Test loss to the Lions in Wellington.
Williams was sent for an early shower in the 25th minute after a crunching shoulder charge that struck Lions winger Anthony Watson flush in the face.
After a period of discussion with his assistant referees and TMO George Ayoub, Garces said he was left with no choice but to brandish red.
"I need to protect the player. It was a direct charge on the head," Garces told skipper Kieran Read in justifying his call.
The last All Black to be sent off was Colin Meads, against Scotland in 1967.
The only other All Black to be sent off in the side's history is Cyril Brownlie, who was sent off against England at Twickenham in 1925.
Williams will face a three-man judiciary this afternoon in Wellington, which will determine the severity of his punishment.
In all likelihood, he will be suspended for next weekend's Test decider.
In response to Williams' red, Ngani Laumape was introduced for his Test debut at inside centre and Jerome Kaino substituted, leaving the All Blacks one forward down.
It was a move that paid dividends for a period, as the world champions ground their way to a nine-point lead with 20 minutes to play.
But tries to Taulupe Faletau and Conor Murray, as well as a 78th-minute Owen Farrell penalty goal, condemned New Zealand to a first home loss in eight years.
ALL BLACKS TEST RED CARDS:
- Cyril Brownlie vs England, 1925
- Colin Meads vs Scotland, 1967
- Sonny Bill Williams vs British and Irish Lions, 2017
Photo: Photosport All Black Sonny Bill Williams is red carded