"We're thrilled to announce that Ducati and Pecco Bagnaia are teaming up for another two seasons," the team wrote on X, formerly known as Twitter.
Italian Bagnaia added: "So far everything has been beautiful, but we are here to make it extraordinary, together, again and again."
The 27-year-old is aiming for a third consecutive world crown during the 2024 season, which begins this weekend in Qatar.
Bagnaia has always ridden a Ducati since he joined the premier category in 2019, initially with the Pramac satellite team and since 2021 with the official team.
The Turin-born rider, who went through the VR46 academy founded by Italian great Valentino Rossi, has 18 MotoGP race wins, including seven last season.