El-Hadji Diouf claimed his first goal for Rangers before strikes from former Rangers midfielder Pedro Mendes and Yannick Djalo appeared to have secured victory for the home side.
But Edu pounced in injury time with the decisive goal in the tie as Rangers triumphed on the away goals rule after the first leg had ended 1-1.
The Scottish giants now face PSV Eindhoven in the last 16 of the tournament.
Diouf was handed the job of getting the goals for Rangers as the lone striker, taking on the role from Kyle Lafferty, who was dropped from the first leg after spurning several chances.
Kyle Bartley and John Fleck, who was making his first start in three months, were drafted into the side following the 1-1 draw at Ibrox, with Vladimir Weiss also out of the side and named among the substitutes.
Steven Whittaker - who netted in the first leg - demonstrated his versatility once again when he was deployed in an unfamiliar central midfield position, with Rangers short of options in that area of the park.
Sporting's dismal league campaign meant they were under pressure to deliver on the European stage and they were out of the traps quickly, testing Allan McGregor in the opening minutes.
Whittaker gifted possession to Djalo who unleashed from six yards but his angled drive was confidently blocked by the Rangers goalkeeper.
Rangers surged into the lead with 20 minutes gone when Steven Davis raced on to a Richard Foster ball down the right flank before picking out Diouf for the header at the back post.
With their away goal from the first leg now cancelled out, Sporting set about trying to haul themselves back into the tie.
Mendes had a go from distance with a shot that fell wide, before setting up Alberto Zapater who hooked over for the home side.
Sporting continued to push forward and could have had a penalty when Joao Pereira went to ground under pressure from Bartley but Italian referee Paolo Tagliavento ignored the pleas.
But they were back on level terms after 42 minutes when David Weir failed to clear an Evaldo ball into the box, which bounced off Bartley and fell for Helder Postiga who set up Mendes to rifle past McGregor.
There was an altercation between Diouf and Marco Torsiglieri as the players left the pitch at half-time, with the Rangers forward clearly furious with the actions of his opponent, who appeared to catch Diouf with an elbow.
Once the second half was under way, it was Sporting who had the best of the chances and McGregor was called into action to produce an impressive save to prevent Matias Fernandez's swerving free-kick from finding the back of the net.
The home side should have been celebrating when Mendes turned provider for Pereira but he somehow managed to nod over from close range, before then seeing a point-blank shot blocked by McGregor.
Rangers made a double switch with 20 minutes to go when David Weir and Fleck were withdrawn, and Lafferty and Weiss were thrown into the action with the tie still hanging in the balance.
When those changes failed to yield a winner, David Healy was introduced in place of Diouf but it was Sporting who netted again just seconds later with 83 minutes on the clock.
Pereira delivered the cross to the back post where Djalo beat Foster to the ball to send a firm header past McGregor.
Just when Sporting thought they had sealed their passage to the last 16, Rangers grabbed an equaliser in injury-time when Healy's cross was met by Edu who remained in an onside position to stab home the goal that won the tie.