Baldwin, 33, requested to leave Worcester Warriors on compassionate grounds and the Ospreys are delighted to be able to offer him the opportunity to resume his rugby career in Wales.
He will join with immediate effect and has signed a contract until the end of the 2022-23 season.
The Bridgend-born front rower left the Ospreys in 2019 after a successful decade at the Swansea.com Stadium before signing for Harlequins.
During his time at the Ospreys he established himself as a strong scrummager, an abrasive ball carrier and became a mainstay of the Wales squad that reached the 2015 World Cup quarter-finals.
He made 165 appearances for the Ospreys, scoring nine tries and has been capped 34 times by Wales.
Baldwin’s rugby career began with Bridgend and he was part of the Harlequins squad that lifted the English Premiership title last season.
Baldwin, Ospreys and Wales hooker, said: “I am very grateful to the Ospreys for stepping in and offering me the chance to resume my career in Wales. The Ospreys is my home region and I have always been an Ospreys supporter.
“It is where I established myself and I still have good friends at the Ospreys. Having worked with Toby before, I know what he expects and look forward to playing my role within the team and to develop the younger players.
“But my mindset is to be the number one hooker at the Ospreys. I know no other way and everyone can see the changes at the region and how things have really started to move forward.”
Toby Booth, Ospreys Head coach, said: “Everyone knows the tragic circumstances around Ifan Phillips that means the Ospreys require cover at hooker. With Dewi Lake being called up to the Wales squad, we need strengthening in that position.
“Scott will bring a wealth of experience of international rugby and of playing in the English Premiership. He also knows what it means to represent his home region.”