Harbaugh coached the 49ers for four seasons, leading them to three NFC championship games and a Super Bowl in his second season. He had one year remaining on the $25-million deal he signed in 2011. He finished 49-22-1.
"The San Francisco 49ers and Jim Harbaugh have mutually agreed to part ways," the team announced in a news release immediately following Sunday's 20-17 victory over Arizona.
"The 49ers organization has begun its search for the team's next head coach, while Harbaugh is now free to consider his next coaching opportunity without any constraints."
According to multiple reports, Harbaugh will be named this week as coach at the University of Michigan, his alma mater, possibly as soon as Tuesday.
If the 49ers promote a coach from within, a leading contender is defensive line coach Jim Tomsula.