The two Premier League giants were said to be interested in the services of the 22-year-old, but Dortmund have beaten both to the prize in a deal thought to be worth in the region of €22 million.
Akanji, a Switzerland international centre-half, has signed a four-and-a-half-year deal at Signal Iduna Park.
He arrives as head coach Peter Stoger's first signing since taking over from Peter Bosz in December.
"Manuel has been the target of several top European clubs with his performances and we are happy that he has chosen us," said sporting director Michael Zorc.
"He has proven in the national team and in the Champions League that he can play at the highest European level. Nevertheless, we see him as a defender, who has further development potential."
Akanji, who will wear number 16, said: "I felt very good in the talks with the Dortmund managers, so it was a decision of the heart and I've always liked the football played in Dortmund.
"I'm looking forward to the time here and will do my best."
Akanji won the Swiss Super League with Basel in 2015-16 and followed that up with the domestic double last season.