The back-up goalkeeper has been named in Madrid's squad for their first two LaLiga games of the season but will now have to serve a period of self-isolation.
He is the fourth Madrid player to contract COVID-19 over the past month after David Alaba, Karim Benzema and Alvaro Odriozola also returned positive tests.
Ukraine keeper Lunin previously tested positive while away with his national side last October, although it turned out to be a false positive and he was cleared to return to action.
Madrid confirmed the news in a short statement on their official website on Wednesday, though they did not clarify whether the 22-year-old was asymptomatic.
Lunin joined Madrid in 2018 but has made just one appearance – in last season's shock Copa del Rey defeat to Alcoyano – having spent three previous spells out on loan.
Carlo Ancelotti's side travel to Real Betis on Saturday in their final game before the first international break of the season.