Harbaugh was quarterback coach for the Oakland Raiders in 2002 and 2003 under Bill Callahan.[4] During his tenure with the Raiders, Harbaugh coached starting quarterback Rich Gannon, who led the Raiders' run to Super Bowl XXXVII, won the 2002 AP NFL MVP award, and was selected to the 2003 Pro Bowl after the 2002 season.
Harbaugh was named head football coach at the University of San Diego. In his first year, he directed the Toreros to an overall mark of 7–4, including 5 straight wins to end the season. The following year, the team improved to 11–1 and won the 2005 Pioneer Football League championship. In 2006, USD again went 11–1 winning their second consecutive Pioneer League title in the process. Harbaugh is widely considered the greatest coach in the history of the university.
Stanford defeated #1 USC 24–23 with a touchdown in the final minute. With USC being the favorite by 41 points, it was statistically the greatest upset in college football history.
Harbaugh has never lost in USC's home stadium, the Los Angeles Memorial Coliseum
Running back Toby Gerhart was named a Heisman Trophy finalist rushing for 1,871 rushing yards and 28 rushing touchdowns under Harbaugh.
The 2010 season brought more success for Harbaugh and the Cardinal. The team went 11–1 in the regular season, with their only loss coming from Oregon, a team that was undefeated and earned a berth in the BCS National Championship Game. The first 11 win season in program history earned the Cardinal a #4 BCS ranking and a BCS bowl invitation to the Orange Bowl. Stanford defeated Virginia Tech 40–12 for the Cardinal's first bowl win since 1996 and the first BCS bowl victory in program history
Second year starting quarterback Andrew Luck was the runner-up to for the Heisman Trophy, the second year in a row that the runner-up was from Stanford. Harbaugh was named the winner of the Woody Hayes Coach of the Year Award
Prior to Harbaugh's arrival, the 49ers had not had a winning season nor a playoff win since 2002.
Though the 49ers were expected to struggle in what was anticipated to be a rebuilding season,[91] with a new scheme and many new players as well as shortened summer practices due to the lockout, Harbaugh led the team to a 13–3 record in the regular season, winning the NFC West division while finishing second overall in the NFC and bringing the team to the NFC Championship Game. This was the first time the 49ers had made the playoffs since the 2002 NFL season, generating widespread praise
In the 2012 season, Harbaugh resolved a quarterback controversy by replacing incumbent starter Alex Smith with backup Colin Kaepernick. Smith was ranked third in the NFL in passer rating (104.1), led the league in completion percentage (70%), and had been 19–5–1 as a starter under Harbaugh
Harbaugh's quarterback decision was on display in the first game of the playoffs.[97] The 49ers won 45–31 over the Green Bay Packers, as Kaepernick had 444 yards of total offense (263 passing, 181 rushing) and four touchdowns. Kaepernick set the record for rushing yards by a quarterback in any NFL game with his 181-yard outburst against Green Bay
Harbaugh left the 49ers as one of their most successful coaches in just four years, as well as becoming the first successful NFL coach to depart for a college team.[109][110] After Harbaugh's departure, the 49ers sank back into mediocrity, and new head coach Jim Tomsula was fired after just one season where the 49ers finished 5–11