The substitute unleashed a dipping shot from 30 metres that blazed past Henk Timmer 10 minutes from time to hand the Portuguese side a 2-1 win to take to the Netherlands next week.
The other game between twice winners Parma and CSKA Moscow ended in a tepid goalless draw at the Tardini stadium. Serie A strugglers Parma, as in previous rounds, fielded a virtual reserve side but CSKA were unable to take advantage in front of just over 7,000 fans.
Sporting, who have not won a European trophy since lifting the Cup Winners' Cup in 1964, needed a moment of sublime inspiration from substitute Pinilla to forge ahead against a resilient AZ.
"We would have liked not to have conceded but that happened in a difficult game," said Sporting coach Jose Peseiro.
"We did not play well but Pinilla's goal has given us a major boost and we are confident for the second leg."
Injury-hit AZ, beaten finalists in 1981, soaked up long periods of pressure but were always dangerous on the counter-attack. Having never lost a European tie at their tiny Alkmaarderhout stadium AZ are still very much in the tie.
AZ, who lined up with Robin Nelisse as a lone striker and packed the midfield, went ahead against the run of play after 36 minutes with their first chance, a right-wing cross from Kew Jaliens falling for Denny Landzaat to sweep a low first-time
The lead lasted barely a minute, however, as Cameroonian Rodolph Douala took advantage of a lucky ricochet to lash home a fierce low shot past Timmer.
Parma coach Pietro Carmignani has made no secret that his side's priority is maintaining their Serie A place and he again rested key players against CSKA.
Italy striker Alberto Gilardino and midfielder Domenico Morfeo were not even on the bench as Carmignani fielded four youth-team players.
"We were on top of things and we played with heart and with brains," he said.
"We've kept the tie open and now they have to beat us because we will go through with a (scoring) draw," added the Parma coach, who said he would not be including Gilardino for the return leg.
"He needs to rest. Serie A comes first for us," he said.
Chances were few and far between in a match riddled with errors and with neither side showing much ambition.
Parma's Fabio Vignaroli brought the first save out of either keeper with a thundering 20-metre drive that CSKA's Igor Akinfeyev parried out eight minutes from time.
"I think it is the first time I have seen a game with so few chances," said CSKA coach Valeriy Gazzayev.
"I asked for a calm approach from the players because we had seven of them on a yellow card. I think we achieved what we wanted from this result."