But Kansas (18-12, 1-5 Big 12) sent 13 batters to the plate in the bottom of the second inning, scoring seven to take a 7-6 lead.
The Jayhawks stretched the lead to 8-6 in the sixth on Erick Morrison's RBI.
But Brown tied the game at 8-8 with a two-out, two-run home run in the top of the seventh.
Carter laced a 2-2 fastball up the middle in the eight to drive in two runs and give Texas A&M (21-6, 6-3) the lead for good.
Reliever Kyle Thebeau gave up one hit in two innings to take the win for the Aggies. Travis Starling pitched 1 1-3 innings to earn his sixth save.
Andres Esquibel gave up two runs on five hits in 1 1/3 innings to take the loss for Kansas.