Left-back Baba, who joined Chelsea from German side Augsburg in the summer of 2015, divided last season between loans at Schalke in Germany and then Reims in France.
It was while with Schalke in 2016/17 that he suffered a serious knee injury sustained playing for Ghana at the Africa Cup of Nations, bringing that season to an early conclusion.
When ready to play again, he returned to the Bundesliga club before the January switch to Reims where he played 11 games.
Baba made his Chelsea debut in a 4-0 Champions League win over Maccabi Tel Aviv in September 2015 and has 23 Blues appearances to his name. His new contract takes him to 2022.
Real Mallorca are in the Spanish top-flight having been promoted via the play-offs last season.