The deal comes after Pramac confirmed Zarco's departure over the Austrian Grand Prix weekend, with Rins' move announced before the British GP.
Zarco has been a Ducati rider since 2020, when the Italian marque signed him to a deal to join the Avintia satellite squad.
He will move to the Honda team next season, though the Frenchman's team-mate is yet to be confirmed.
Speaking after the announcement, team boss Lucio Cecchinello said: "We are very excited to welcome Johann to the team with all the respective details and signatures now in place.
"It is a return to the team after we had some brief time together in 2019, where we could already see his potential and work ethic.
"There are still a lot of races and work to be done this season, but we are looking forward to the start of this new project in 2024."
Zarco's stint at Ducati began after he elected to quit his KTM deal a year early during a difficult 2019 season on the RC16 following his switch from Tech3 Yamaha. KTM then parted ways with him with immediate effect after the San Marino GP.
The two-time Moto2 world champion was reticent to join Avintia as he deemed it "not a top team", but managed a pole position and a podium in 2020 for the squad before being promoted to Pramac on full works-spec Ducati machinery.
Since then, he has scored 12 grand prix podiums with Pramac, the most recent coming prior to the summer break in Germany.
Paolo Campinotti, Pramac team principal, said: "Over the course of three fantastic years alongside Johann, the team has taken a significant step forward, thanks in no small part to his immense talent.
"This progress has brought him to the position of being the current leader of the MotoGP championship.
"For this reason, I can only express my regret that he won't be part of our family in the upcoming season, but I wish him all the luck in the world for his future endeavours.
"Now, all that's left for me to do is enjoy working with him until the end of the championship, expecting great things from him once again."
Zarco previously had links to Honda for 2019 before signing with KTM, then contested the final three grands prix of that year with LCR as Takaaki Nakagami's injury replacement.
This is a major piece of the 2024 grid puzzle now in place, with the next big move set to be Marco Bezzecchi's decision on whether to stay with VR46 Ducati or move to Pramac to take Zarco's place.
Ducati has made it clear that double grand prix winner Bezzecchi's only chance of having a factory-spec bike in 2024 will be at Pramac, with VR46 set to remain with year-old machinery.
Valentino Rossi told Sky Italia this weekend that he has been "pushing" Bezzecchi to stay where he is, as he feels VR46 can still offer him a competitive package despite not having full factory bikes.
Bezzecchi's decision will have an impact on what happens with Franco Morbidelli, who will leave Yamaha at the end of the year.
Should Bezzecchi remain at VR46, which appears to be his preference, then Morbidelli could well end up with a plum factory ride at Pramac in 2024.