The three-time Pro Bowl defensive back had missed the past two games due to the knee injury following being benched for an Oct. 19 game against the Miami Dolphins for disciplinary reasons.
McAlister, 31, sought second opinions from specialists in Canada and Florida before telling Harbaugh about his decision.
The impending surgery would be to repair posterior cruciate ligament and cartilage damage. Free safety Ed Reed said that McAlister has similar knee problems to nose guard Kelly Gregg, who underwent microfracture surgery, and was at risk of endangering his career if he had kept playing.
"He expressed to me that he felt like it was in his best interests," Harbaugh said. "The knee is a problem. It's a problem because of the position he plays. It just wears the knee down. So, he has to get that corrected. There's two things going on in there."
The Ravens held preliminary discussions with former Oakland Raiders cornerback DeAngelo Hall, but the two-time Pro Bowl selection opted instead to sign a one-year contract with the Washington Redskins and may eventually sign a long-term deal if it's a smooth transition to his third team in the past year.
Before Hall signed with the Redskins on Friday afternoon, Harbaugh acknowledged that he was on the Ravens' radar. Hall's agent told Ravens Insider that the Ravens were under consideration, but the former Virginia Tech star preferred the Redskins over the Ravens and a handful of other teams, including the New England Patriots, Pittsburgh Steelers and New York Jets.
"We'd be interested if he was interested in coming here under our framework," Harbaugh said. "We think that we'd be a pretty attractive option for him in the sense that he can come in here and help our football team win football games. We've got some really good corners.
"We don't need a top corner. We need another good football player. We want to talk to him to make sure he felt good about doing it the Raven way," Harbaugh said. "He's got a good heart, and he's a good person."
Meanwhile, McAlister's future with the Ravens is in doubt for multiple reasons.
He is due $8 million base salaries in 2009 and 2010, the final two seasons of a seven-year, $55 million pact.
And the outspoken cornerback didn't mesh well with the new coaching staff this season, having general issues with discipline and being on time for meetings.
When asked following the Miami game if he had been punished by the coaching staff, McAlister encouraged reporters to "read between the lines."
McAlister was admonished by Harbaugh for wearing a T-shirt and shorts in the lobby of the team hotel prior to the Dolphins game. He was spotted with three women in the lobby, but Harbaugh said they were there to pick up tickets from McAlister.
After intercepting three passes in the first four games to lead the team, McAlister was burnt twice for touchdowns by wide receiver Marvin Harrison in a 31-3 loss.
While Harbaugh and McAlister both maintained that he wasn't hurt after the Miami game, McAlister then surfaced on the injury report with the right knee injury that has plagued him since training camp. He was deactivated for the past two games.
"It's definite a big blow to the secondary," cornerback Fabian Washington said. "People don't understand how big a blow it is to lose him. The guy can flat-out play football. He's definitely a gamer. He throws his body around and makes plays. Myself, Mr. [Samari] Rolle, Mr. [Frank] Walker and Mr. [Corey] Ivy all have to step our games to fill that void."
Rolle, who's returning Sunday against the Houston Texans following neck surgery, is likely to draw the assignment of guarding Pro Bowl wide receiver Andre Johnson, and Washington will probably be lined up against Kevin Walter.
Plus, the Ravens may place safety Dawan Landry on injured reserve as soon as Monday. Landry is still having tingling sensations in his neck following a spinal cord concussion in the second game of the season against the Cleveland Browns.
"I wouldn't say it's optimistic right now," Harbaugh said. "We're still trying to hold out hope."
McAlister ruled out for season
Ravens Insider Top Stories
What was Vikings’ ‘business principle?’The Minnesota Vikings signed three big contracts with unrestricted free agents, but the way they structured them seems to hint at their “business principle.”
Viking UpdateWednesday at 7:04 AM
Tom Herman's PSA to UT StudentsIn another attempt to bring pride and tradition back to Texas football, head coach Tom Herman is expanding the Longhorns' spring practice competition to the student ranks -…
Denver Broncos 2017 Free Agency TrackerKeep tabs on who the Broncos have interest in as Free Agency approaches.
Mile High Huddle03/13/2017
Free Agent Frenzy: Who's Left For Denver?We're only a few days into free agency and the Broncos have made some moves. They still have cap space and could look to add in a few more areas. MHH Senior Analyst Erick Trickel…
Mile High Huddle03/12/2017