Pennetta, the 26th seed, won 7-6 (7-4) 6-2 to become only the second Italian woman to win one of the tennis majors.
She then said: “I make a big decision in my life – this is the way I like to say goodbye to tennis.”
The 33-year-old from Brindisi confirmed she plans to play the rest of the season before retiring.
“One month ago I decided that this is the way I would say goodbye to tennis,” added Pennetta, who collected a winner’s cheque of $3.3m (£2.1m).
“This is my last and I couldn’t think of finishing in a better way.”
Vinci, ranked 43rd in the world, had stunned Serena Williams in the semi-finals, ending the world number one’s bid for a calendar Grand Slam.
The 32-year-old from Taranto, said: “I am really happy and really happy for Flavia. It’s tough to play against a player who you have known for a long time.
“I tried to play my best, but Flavia played unbelievable and I have to say congrats to her.”
Pennetta later cleared up any confusion arising from her surprise post-match announcement on court.
“I will play until the end of this year but it was my last match here in New York,” she explained.
The new world number eight will play two tournaments in China, as well as the WTA Finals in Singapore if she qualifies, before calling it a day.
“Sometimes it’s getting hard for me to compete,” said Pennetta, who joins 2010 French Open champion Francesca Schiavone as a female Italian Grand Slam winner.
“You have to fight every week and if you don’t in the way I did today, it’s going to be bad. I don’t feel like I have this power any more.
“It was a really hard decision but I’m really happy I did it. I’m really happy and proud of myself.”
Vinci, asked what their appearance in the final together had proved, said: “I beat Serena – a miracle. Two Italians can reach the final – a second miracle. And one Italian player can win a Grand Slam.”
Prime Minister Matteo Renzi was courtside after flying in for the first final between two of his compatriots since the open era began in 1968.
It was Pennetta who prevailed after making the running from the outset, breaking serve at the seventh attempt in a dramatic seventh game.
Vinci was tentative, making little headway with her sliced backhand until a Pennetta error brought her level at 4-4.
A tie-break was required and again it was Pennetta who held her game together better, clinching it with a serve after four errors from Vinci.
Pennetta raced 4-0 clear in the second, a big enough lead to absorb a brief fightback from Vinci, and the darkening skies above loomed as the biggest threat to her hopes.
The drizzle did arrive but only moments after Pennetta had fired a forehand into the corner on match point.