Nadal, the winner of a record 21 Grand Slam singles titles, complained of a chest issue during his run to the final of the ATP 1000 event in Indian Wells, California last week.
Upon his arrival in Spain today, Nadal visited his medical team in Barcelona for tests which revealed "a stress fracture of the third left costal arch".
"This is not good news and I did not expect this," Nadal said in a statement sent by his team.
"I'm disappointed and sad because after a good start to the season I was coming to a very important part of the year with very good feelings and good results.
Nadal's injury occurred during his three-set semi-final victory over teenaged compatriot Carlos Alcaraz but he still played the final in which he went down to American Taylor Fritz - his first loss in the season after 20 consecutive wins.
His doctor said that the 35-year-old will be out of action for "four to six weeks", ruling him out of next month's Monte Carlo Masters and putting doubts over his participation in the ATP 1000 events in Madrid and Rome in May.
The French Open, the year's second major at Roland Garros where Nadal has won a record 13 titles, is scheduled to start from May 22.