Emergency vehicles raced to the site of the strike, just 6km (four miles) from the city centre, after three loud explosions were heard early on Friday.
No-one was injured in the attack.
It is the closest the conflict has come to Lviv, a key humanitarian supply route and a hub for hundreds of thousands of people who have fled.
Western Ukraine has so far been quieter than the rest of the country. Russia launched its invasion on three fronts – from the north, east and south – leaving cities such as Lviv relatively unscathed.
But there are signs that may be changing, after Friday’s strike and a deadly missile attack on a military training base outside the city on Sunday.
“There have been air raid alarms here every morning, but now the strikes are actually landing,” Valentin Vovchenko, 82, told the AFP news agency from Lviv. “We fled Kyiv because of the attacks but now they’ve started to hit here.”
The city’s mayor, Andriy Sadovy, confirmed that the military aircraft maintenance facility had been destroyed by cruise missiles.
The facility, which was not in operation at the time, is only a short distance from the Danylo Halytskyi International Airport. Mr Sadovy, however, said the airport itself had not been hit.
Ukraine’s air force said six cruise missiles had been fired in total from the Black Sea. Two of them were destroyed by anti-aircraft missiles.
“The Russians are going for the infrastructure that is keeping Ukrainian aircraft in the air,” Prof Michael Clarke, the former director of the Royal United Services Institute (RUSI) think tank, told the BBC.
Lviv is just 80km from Poland, a country that has taken in more than two million Ukrainians who are seeking refuge from a conflict that has destroyed homes and upended lives.
Prof Clarke said that, given the facility’s proximity to the Polish border, the strike could be seen as “an attempt to frighten the West out of helping Ukrainians as much as they have been”.
Unlike its indiscriminate shelling of Ukrainian cities, Russia appears to be using its long-range precision weapons – like cruise missiles – to hit specific military sites.
And the target list appears to be expanding to the west of the country. It’s likely this facility was used to maintain Ukraine’s dwindling number of older fighter jets.
The fact that Russia is using long-range missiles illustrates another important fact – one that has surprised many military analysts. So far, Russia has failed to gain supremacy in the air. Western officials say Ukraine’s air defences have been a key reason for that.
But as this attack shows, Russia recognises that it needs to degrade those air defences. Not just by targeting them directly, but also by destroying ground-based missiles batteries which are being used every day of this war.
Ukraine no doubt needs more supplies. One Western intelligence official told the BBC that Kyiv has been “very specific” in requesting more air defence ammunition – including for its older long-range air defence systems. The official said they are needed in large quantities because of the sheer number of Russian aircraft.
“It is very much a part of war that you go after each other’s supply lines,” UK Armed Forces Minister James Heappey told the BBC. “But the reality is this development will be a concern for people living in the west of Ukraine.”
He added that the UK was in the process of training up Ukrainians to use Starstreak anti-aircraft missile systems, which he said would arrive in the country imminently.