Yamaha announced earlier this month that it had re-signed Rossi after the seven-time MotoGP champion finally gave up in his mission to add an eighth crown with the Italian manufacturer.
Since then Dovizioso has been heavily-tipped to replace Rossi, and the deal was made public on the eve of the Czech MotoGP at Brno this weekend.
"The agreement reached with Andrea Dovizioso confirms the company's primary interest in racing, which is an active and strategic part of Ducati's DNA and heritage," said Ducati president Gabriele Del Torchio. "It is with great pleasure that I welcome Andrea, as we marshal our best efforts in confronting the MotoGP World Championship.
"Along with Nicky Hayden, with whom we have renewed a working agreement, we are confident that we will be able to proceed with our development programme, to compete, and to obtain the results and rewards that will repay our efforts and the faith that our partners, sponsors and fans have never failed to demonstrate."
Ducati Corse's general manager Filippo Preziosi added that Dovizioso's technical prowess and experience will be a great boost to the team as it seeks to develop its way back into a winning situation.
"Andrea's technical sensibility and test-riding abilities are of great value, as are his talent and determination," said Preziosi. "The knowledge that we will have him on our team and be able to count on his collaboration serves as an additional incentive to continue with the growth and development of our MotoGP project.
"I'm pleased that he has chosen to be a part of our team. He is aware of the work to be done, and he approaches it with enthusiasm and confidence, which are fundamental requirements for achieving success and for competing in this challenging championship."
Dovizioso left HRC at the end of 2011 after the works Honda squad reduced its factory team down to a two-bike effort and has been a regular podium finisher this year with the satellite Tech 3 Yamaha squad this year.
The 26-year-old told Gazetta dello Sport recently that Rossi's failure, and the fact that so few top riders have been able to adapt to Ducati MotoGP machinery would not deter him: No rider likes to change often, but it's okay: I have adapted to the Yamaha bike, so I'll do the same with the Ducati."