The 35-year-old ex-Portugal international had joined Real from Chelsea in 2010, having won the Champions League under Jose Mourinho for Porto against Monaco in the 2004 final.
Carvalho, whose arrival as a free agent was announced by the Ligue 2 champions on their website, was out of favour at Real where he played eight La Liga games this season.
The principality club have already signed midfielders Joao Moutinho and James Rodriguez from Porto on five-year contracts for a combined 70 million euros as they look to emulate the success of Ligue 1 champions Paris Saint-Germain.
There is also media speculation that Monaco, backed by Russian billionaire Dmitry Rybolovlev since late 2011, are about to sign Colombia striker Radamel Falcao from Atletico Madrid.
Moutinho and Rodriguez, aged 26 and 21 respectively, were instrumental in helping Porto clinch a third consecutive domestic league title this season.
Monaco are at odds with the French football authorities over tax exemptions but have attracted many leading players helped by the fact that, under the principality's laws, foreigners do not pay tax on their wages.
The French League (LFP) has ruled that the club must move their head office to France by the start of June next year, meaning players would pay tax in France.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.