It was the Aztecs fourth overtime game this season, the most in the FBS and tied for most in FBS history.
Boise State's Dan Goodale, who missed a 43-yard field goal as time expired in regulation, booted a 35-yard field goal giving Boise State a 31-28 lead on the first set of downs in the overtime.
The Aztecs moved down the field behind the running of Adam Muema before Kaehler hooked up with Locklett for the game-winning score.
The Aztecs, who trailed 28-21, tied the game with 4:04 left in the fourth quarter on a 41-yard punt return by Tim Vizzi. It was the Aztecs first punt return for a touchdown since 2002.
Boise State quarterback Grant Hedrick, who was limited to just 39 yards passing in the first half, threw two touchdown passes to help the Broncos wipe out a 14-7 Aztec lead and give the Broncos a 21-14 advantage.
Hedrick's connected on a 12-yard TD pass to Shane Williams-Rhodes with 5:02 left in the third quarter and just 1:31 after Jay Ajayi had scored on a 31 yard TD run. William-Rhodes TD came after San Diego State fumbled the kickoff after Ajayi's touchdown.
The Aztecs tied the game at 21-all with 10:37 left in the fourth quarter when J.J. Whitaker, picked off a Hedrick pass and returned it 18 yards for a touchdown. It was his second interception of the night.
The Broncos retook the lead at 28-21 when Hedrick hooked up with Matt Miller on a 10-yard pass with 8:02 left in the fourth quarter, setting the stage for the Aztecs dramatic finish with Vizzi's interception
Both teams are 7-4 on the season. San Diego State is 6-1 in the West Division of the Mountain West Conference that was won by Fresno State earlier in the day. Boise State is 5-2 in the Mountain Division, a game behind Utah State.
Boise State tied the game 7-7 when Bryan Douglas returned a kickoff 100 yards for a touchdown.
San Diego State became the first team to beat Boise State in consecutive seasons since Washington State did it in 2000 and 2001.
Running back Devontae Booker had 124 combined yards and a touchdown and Utah spoiled Jim Harbaugh's Michigan coaching debut, beating the Wolverines 24-17 on Thursday night.
ESPN 300 running back Elijah Holyfield, the son of former heavyweight boxing champion Evander Holyfield, has decided to stay home and attend Georgia, he announced Friday.
Arizona star linebacker Scooby Wright will have an MRI after injuring his left knee in the first quarter of the Wildcats' season-opening 42-32 win over UTSA on Thursday night.
Miami reserve linebacker Al-Quadin Muhammad has been suspended for the season opener against Bethune-Cookman on Saturday for a violation of team rules, a source confirmed to ESPN.com
Trevone Boykin threw for 246 yards and a touchdown and ran for 92 yards and another score to help No. 2 TCU outlast Minnesota 23-17 on Thursday night.
All-American defensive end Shawn Oakman and safety Orion Stewart have been suspended for Baylor's season opener Friday against SMU for a violation of team rules, a school spokesman told ESPN.com.