A close first half contest saw Rio Hardy’s opener cancelled out by Olufoasade Adamolekum’s finish before Jodi McLeary’s tap in meant the away side took a lead into the break.
A controlled second half performance saw further goals from Mia McAulay and Kirsty Howat see the Gers leave the capital victorious as the holders booked their place in the next round of the competition.
Jo Potter named two changes to the starting side that ran out dominant 12-0 winners over Montrose in their last outing before the international break, with Libby Bance making her full debut in place of Megan Bell and Jodi McLeary recalled to the team for Kayla Jardine.
Rangers got off to a positive start in the cup tie. Rachel McLauchlan found herself in an advanced position down the right flank, cutting inside she tried her luck on her left side but an intervention sent it behind for an early corner.
Kathleen McGovern had an early opportunity for the hosts at the other end as they grew into the game in the opening exchanges. Captain Emma Brownlie delivered a cross from a deep area near the Rangers touchline which was met inside the area, but the volley found the side netting.
It was the Gers full-back heavily involved again as her effort was the first on target in the contest on the 10-minute mark. The defender rode a number of challenges before trying her luck but her strike was gathered by Charlotte Parker-Smith at the near post.
Kirsty Howat was next to try her luck as she looked to continue her impressive goal scoring form before the break. The forward found space 25 yards from her goal but her effort flew over the top of the bar.
Rangers took the lead after 17-minutes in the capital. Kirsty Maclean, who was finding herself in acres of space between the lines tried her luck from outside the area. The initial effort could only be parried by Parker-Smith but Rio Hardy reacted first to tap home the rebound to fire in the opener for the away side.
Brownie had an opportunity to level the scoring but for an intervention from the Gers backline. The full-back played a one-two inside the box as she homed in on goal but Kathryn Hill did well to come over and make the block.
Olufoasade Adamolekum levelled up the scoreline in the capital after a mistake in the Rangers defence. A pass out from goalkeeper Jenna Fife was intercepted by the midfielder deep inside the opposing half, she composed herself and placed the ball beyond the shot stopper to make it 1-1.
The home side seemed to grow in confidence after finding the equaliser. They continued to threaten in dangerous areas and looked the stronger of the two teams in that phase of the game as the Gers looked to recompose themselves in the cup tie.
Rangers retook the lead against the run of play as Kirsty Howat and Jodi McLeary combined. The striker managed to spin in behind the Hearts backline as she was found with a ball down the channel. The striker acknowledged her teammate arriving at the back post as she laid the ball across for the youngster to tap it in.
Howat, fresh off her recent Scotland call-up was growing in confidence herself in the game. She did superbly to bring a difficult ball down from a throw-in and try her luck from range, but it was well held by Parker-Smith as the game approached the interval.
Hearts almost came up with a second reply of the day straight after the restart. A ball inside the box initially looked to be heading straight for the hands of Fife but for a moment of confusion which nearly presented the ball to Dannielle McGinley, but the Gers managed to clear the danger.
Rangers were still a threat themselves as they looked to build on their advantage. Rachel Rowe who was introduced at the break for Kirsty Maclean did well to carry the ball over 20 yards as slipped the ball to Howat on her left. The striker cut inside and looked to find the far corner inside the area but her effort was deflected wide.
Georgia Timms tested Fife with an effort as the hosts still went in search of finding the next goal. The striker spun in behind before firing a low shot across goal, but the keeper did well to turn it in around the post.
Howat almost turned provider again after a piece of impressive individual skill. The forward flicked the ball over her head as she burst away from Esther Morgan, firing the ball across goal with pace she looked for the arriving Rowe but the cross was just out of reach for the Wales international.
A superb interchange almost gave the Gers breathing space in the contest. Clever combination play involving McLauchlan and Hardy resulted in the ball breaking for Howat inside the area, but the forward’s shot lacked the desired power to beat the goalkeeper to add a third.
Mia McAulay was next to test Parker-Smith having done well to create space for a shot. The youngster cut inside deep down the left channel before firing an effort at goal, but it was caught by the home side’s shot stopper.
It was the winger just moments later who added a third to give the away side breathing space. Rachel McLauchlan did brilliantly to carry the ball from defence into the opposing half as she rode several challenges in the process. She acknowledged McAulay well placed down the left channel with the youngster cutting inside and firing a shot into the top right corner to make it 3-1.
The game approached its conclusion in the final 10 minutes in the capital. Rangers had a chance to extend their advantage further from an indirect free-kick, Middag laid it off to Rowe but her effort whistled over the top.
Rangers extended their lead and put the cup tie beyond their opponents through Howat. The two strikers combined as she played a one-two with Hardy inside the area before sliding the ball into the bottom right corner on her left side to make it four and round off the scoring as the holders progressed.
HEARTS: Parker-Smith, Morgan (Hunter 75), Brownlie, Grant (Rennie 45), Timms, Lockwood, Waldie, Adamolekum, Girasoli, McGovern (Park 63), Findlay (Anderson 75)
SUBS: Rodgers, Penman, Davies, Cowan, Michie
RANGERS: Fife, McLauchlan, Hill, Docherty (Colson 28), McLeary (Hay 59), Middag (Cornet 59), Maclean (Rowe 45), McAulay, Bance, Hardy (Berry 86), Howat
SUBS: Esson, Bell, Austin, Ewens