Pettitte, who retired before last season, has signed a one-year minor league contract with an invitation to spring training, the team said. If he is added to the major league roster, he gets a $2.5 million deal.
"I think I told y'all, when people asked, 'Would I ever come back?' I said, 'You know what? I would probably be too embarrassed to come back because I'm retiring and I'm announcing a retirement,' " Pettitte said. "That's where I've been over the three or four days. I am embarrassed that I'm coming back. What can I do?
"Things have changed. My desire to do this has changed. I sure in the heck don't want to look back 10 years from now and said, 'Man, I wish I would have done that.' "
For Pettitte, that was the bottom line. He said he knows in his heart that he is doing the right thing.
"I believe if I'm mentally right, then I'm going to win," he said.
Yankees general manager Brian Cashman said the deal has no incentives and that Pettitte would be only a starter.
Pettitte, 39, started 21 games in 2010 for the Yankees, going 11-3 with a 3.28 ERA. He was 14-8 with a 4.16 ERA in 2009, his last full season.
Pettitte got the go-ahead from his family to attempt the comeback.
"They weren't crazy about me retiring last year," Pettitte said. "I would have never done this, especially if my wife didn't feel good about it. It has been awesome being home."
He added: "My family is behind this 100 percent. I have a wife of absolute gold. (She said) 'I'm going to support you and I would love for you to do it if you are going to do it.'"
Cashman said that Pettitte told him he heard an interview the GM did on ESPN Radio in which he said he always would be interested in having the pitcher return.
"He said, 'Hey, I heard about your interview and it got me thinking about it. I 'd like to work out and see where it takes me,' " Cashman said Pettitte told him.
In December, before the trade for Michael Pineda and signing of Hiroki Kuroda, Cashman made Pettitte a substantial offer, somewhere in the range of $10 million to $12 million, he said. At that point, Pettitte was not ready to commit to do a deal.
"He said, 'I would like to work out for six weeks and determine if I can or not,' " Cashman recalled. "I said, 'I can't wait six weeks.' "
Pettitte started working out, but after the Pineda and Kuroda moves, Cashman said he had no more money left. Pettitte shut down his workouts. Or, at least, Cashman thought he did.
In late February, Pettitte went to Yankees camp as a special instructor. During that time, Pettitte pulled Cashman into manager Joe Girardi's office.
Pettitte told Cashman that after taking a week off following the Pineda and Kuroda acquisitions, he started working out again.
Last weekend in Orlando, Pettitte threw batting practice before the Yankees-Braves game. He was in the area with a church group, but Cashman and Pettitte spoke at the batting cage for a long time.
Cashman organized a secret 7:30 a.m. ET Tuesday bullpen session, attended by Cashman, Girardi, pitching coach Larry Rothschild and Gene Michael.
On Friday morning, Hal Steinbrenner signed off on the extra $2.5 million deal. Pettitte is expected to arrive Tuesday. If he makes the major league roster, he probably won't be ready until May.
Pettitte originally was selected by the Yankees in the 22nd round of the 1990 amateur draft. He has the second-most strikeouts (1,823) and games started (396) in franchise history.
Pettitte announced his retirement on Feb. 5, 2011, saying he "didn't have the hunger, the drive that I felt like I needed" to continue pitching in the big leagues. He turned down a $12 million offer in the process.
That announcement came as a trial date loomed for Pettitte's former teammate, Roger Clemens, on charges he lied to Congress when he said he had never used performance-enhancing drugs.
Pettitte, who had publicly admitted to using human growth hormone on two occasions to recover from injuries, was expected to testify at Clemens' trial, which ended in a mistrial before he could take the stand. But Pettitte insisted when he retired that his potential role as a witness did not factor into his decision to retire.
Jury selection for Clemens' new trial begins April 16.
The division rival Boston Red Sox weighed in on the Pettitte signing Friday.
"I don't think he's coming back to where he was," manager Bobby Valentine said. "Call it a hunch. But he's a good pitcher -- borderline Hall of Famer. Add someone like that to your staff and you're doing good."
Said third baseman Kevin Youkilis: "If the guy can pitch 200 innings, that's great. There aren't too many 200-inning guys you can get for 2.5 (million) these days."
Information from ESPNNewYork.com senior writer Andrew Marchand, ESPNBoston.com's Rick Weber and The Associated Press was used in this report.