Fellow Premiership sides St Mirren and Dundee also recorded wins in the second round of group stage fixtures.
Hearts had an early scare in front of 2,000 fans at Tynecastle when Michael Smith cleared off the line from Leighton McIntosh, but Andy Halliday arrowed home a 30-yard strike to settle the nerves in the 12th minute.
Finlay Pollock came close to scoring on his first start as the 17-year-old hit the post, before Kyle Gourlay saved well from Smith.
But the Cove goalkeeper was punished for flapping at a cross just before half-time when Liam Boyce netted.
Mackay-Steven produced a classy finish 10 minutes into the second half after Halliday dispossessed Iain Vigurs.
Inverness also recorded a Group A victory with two goals in four minutes from Manny Duku and Aaron Doran early in the second half sealing a 2-0 home triumph over Peterhead.
Paul McMullan struck a double and set up another two as Dundee beat Brora Rangers 4-0 at Dens Park in Group B.
McMullan pulled the ball back for Paul McGowan to finish in the 24th minute and converted from two Charlie Adam crosses either side of the break.
The former Dundee United winger then set up Alex Jakubiak to score from close range five minutes into the second half.
The hosts played the last 20 minutes with 10 men after Jordan Marshall went off injured, but Jason Cummings came close to a fifth when his shot hit the underside of the bar.
Elsewhere in the group, Forfar and Montrose drew 0-0 at Station Park, with the home side claiming a bonus point.
Curtis Main grabbed the only goal as St Mirren saw off Dunfermline in Paisley. The former Aberdeen and Motherwell striker headed home a cross from fellow debutant Greg Kiltie on the half-hour mark.
Dumbarton suffered a 2-1 defeat at home to Stenhousemuir days after cancelling their clash with St Mirren because of Covid-19 issues. Ross MacLean gave the Sons the lead but James Lyon and Robert Thomson earned the away win.
Morton were also back in action, behind closed doors, after a Covid outbreak cancelled their trip to Stranraer, but they were held to a goalless home draw by East Kilbride. Morton won 5-4 on penalties to seal a bonus point. Stranraer fell to a David Goodwillie goal against Clyde.
Ayr and Falkirk both recorded victories in Group E. Tomi Adeoye netted twice and Andy Murdoch struck as Ayr beat Edinburgh City 3-0, while Callumn Morrison hit a double as Falkirk came from behind to beat Albion Rovers 5-1. Paul Dixon, Charlie Telfer and Ben Weekes were also on target in a satisfying first game in charge for Paul Sheerin.
Raith Rovers moved to six points in Group D after thrashing Brechin 4-0. Brad Spencer hit a double either side of strikes from Lewis Vaughan and Dario Zanatta.
Liam Buchanan got the only goal as Cowdenbeath won 1-0 at Alloa in the same section.
Queen of the South bounced back from defeat by Queen's Park as they secured a 3-1 derby win at Annan. Ally Roy netted twice and Ruari Paton was also on target with Kyle Fleming replying for the hosts.