Los Blancos signed the Spain international on a permanent basis from Espanyol before immediately selling him to Qatari outfit Al Gharafa in a €1.5m (£1.3m) deal.
The 34-year-old scored 17 times for Real Madrid in all competitions during the 2023-24 campaign, and it had been thought that he would remain with Carlo Ancelotti's side next term.
However, Los Blancos will add Kylian Mbappe and Endrick to their squad for the 2024-25 campaign, which is likely to have seen Joselu struggle for action next term.
The forward, who is with the Spain squad at Euro 2024, has admitted that he would have found it difficult to earn regular minutes in 2023-24 due to the additions of new attackers to the squad.
Joselu explains Real Madrid exit
"It was the right time to take that step and simply thank Madrid for helping me carry out the operation. There are some good years coming in Madrid with very young players," Joselu told reporters.
"What pushes you a little is the desire to continue competing, perhaps my role this year would not have been the same as last year.
"I'm going to a very good country and I think it was the perfect time to be able to take that step. What I didn't want was to go to another European club, I have left in the best possible way, winning titles."
Joselu has signed a two-year contract with Al Gharafa, with the option of a further 12 months, and it is understood that the deal is worth in the region of €17m (£14.4m).
How will Real Madrid line up next season?
Mbappe is expected to operate through the middle for Real Madrid next season, with the France captain set to play in a front three with Rodrygo and Vinicius Junior.
Toni Kroos's retirement will likely see Jude Bellingham switch back into central midfield alongside Aurelien Tchouameni and Federico Valverde, with Eduardo Camavinga and Luka Modric also rotating into the side.
Endrick, 17, will not be a starter next season, with the Brazil international instead expected to feature off the bench, but he is certainly capable of making a big impact.
Nacho's decision to leave could see Real Madrid bring in a new centre-back, meanwhile, with Leny Yoro widely expected to arrive from Lille.
Real Madrid won La Liga and the Champions League last season and are again expected to be the team to beat in both competitions during the 2024-25 campaign.