Dortmund said in a hastily arranged news conference with the Turkish international that Sahin, who earlier passed a medical in the city, had signed a one-and-a-half-season loan deal until 2014.
"I am happy to be home again. My contact with the club officials, players and coaches never stopped in the past year and a half. I hope I can quickly help the team," the 24-year-old said.
German-born Sahin, who left Dortmund for Real in 2011 after helping them win the Bundesliga title, failed to earn a starting spot in Spain before joining Liverpool in August 2012 on loan.
Sahin, whose contract at Real runs to 2017, holds the records for the youngest player to appear in a Bundesliga game and the youngest to score a goal in Germany's top division.
It is unclear whether Dortmund have an option to buy him after 2014 although sports director Michael Zorc said the club was in a strong position.
"We have taken precautions and have the steering wheel in our own hands," Zorc said.
The hugely gifted Turkey midfielder played for more than a decade at Dortmund, going through the youth ranks, before leaving in 2011. He had played 135 Bundesliga games for the club, scoring 13 goals.
"We had said during the title celebrations in 2011 that Nuri Sahin will always remain a special player for us and that the door would always be open if he had a deep wish to play for the BVB again," said beaming Dortmund CEO Hans-Joachim Watzke.
"He expressed this wish to us a few days ago and we responded."
There was more good news for Dortmund on Friday with Germany defender Marcel Schmelzer signing a three-year contract extension that will keep him at the Ruhr valley club until 2017.
Team-mates Sven Bender and Neven Subotic extended their deals earlier this week.
Dortmund stand third in the Bundesliga, 12 points behind leaders Bayern Munich, and are through to the Champions League last 16 where they face Shakhtar Donetsk with Sahin eligible to play. They also take on Bayern in the German Cup next month.