"He took a step, and the knee locked up," said Mattingly.
Palmer had a 3.60 ERA in three spring appearances, allowing nine runs (seven unearned) in five innings, his outings marred by several errant pickoff throws. He allowed nine hits.
"He felt like there had been a little swelling. [It] might have been a sign, but he didn't think it was a sign," said Mattingly. "To me, if it happened when he was walking, it was going to go anyway."
An MRI showed a medial meniscus tear. The surgery will be performed by Dr. Brian Shafer in Phoenix on Tuesday. Palmer is expected return to play in 6-8 weeks.
Palmer, a 33-year-old right-hander, has pitched parts of the past five seasons in the Major Leagues, including briefly for San Diego last year. He went 11-2 for the Angels in 2009 as a swingman.
Ken Gurnick is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.