After being eliminated by Leganes in the competition's quarterfinals last season, Real Madrid cruised to a first-leg victory at Santiago Bernabeu Stadium.
Spain youth global Diaz, 19, joined from Manchester City for £15m last week and appeared as a substitute with 12 minutes remaining.
Lucas Vazquez added the second after a defensive mistake form the visitors was followed up by some unselfish play form Vinicius Jr.
Leganes had stunned its Madrid neighbor with a win at the Bernabeu almost a year ago, but now it will need an even greater feat next week at home to pull off another shocker.
"Vinicius transmits joy, he has always had talent but to show it at the Bernabeu speaks volumes of his ability", said coach Santiago Solari, who has faced fierce criticism for Real's limp start to 2019.
With Gareth Bale, Marco Asensio and Karim Benzema all failing to fill the gaping hole left by Cristiano Ronaldo's departure to Juventus, the 18-year-old Brazilian who began the season toiling in Spain's third division with Madrid's reserve side has unexpectedly turned into a figure of inspiration at the club.
"The thing in football is exploding and then sustaining, but he has the things that can break defences".
"Following tests carried out on our player Thibaut Courtois today by the Real Madrid Medical Services, he has been diagnosed with a grade 1 injury in the left iliac muscle".
Keylor Navas returned to the starting XI for the Copa del Rey and performed well, keeping a clean sheet.