Utah and Colorado also advanced in the tournament.
Carson established a career best with his 34 points, allowing the Sun Devils to overcome the loss of an eight-point lead late in the second half.
Evan Gordon's free throw with 8 seconds left gave Arizona State a four-point lead, creating some breathing room that the Sun Devils needed when Josh Huestis hit a 3-pointer just before the buzzer for Stanford.
Arizona State (21-11) will meet regular-season champion UCLA in the quarterfinals.
Colorado defeated Oregon State in their first-round matchup 74-68 and Utah knocked off USC 69-66.
Spencer Dinwiddie led Colorado with 20 points while Xavier Johnson had 16. The Buffaloes had suffered a home loss to Oregon State in their regular-season finale last weekend.
Colorado will face No. 18 Arizona on Thursday.
Utah, appearing in its first Pac-12 Tournament, got 22 points from Jarred DuBois and will now tackle California in the quarterfinals.
The Utes held a 35-28 lead at intermission after the Trojans had hit just 33 percent from the field and missed all six of their attempts from 3-point range.
The winner of Wednesday night's late game between Washington and Washington State will play Oregon in the final quarterfinal game on Thursday.