Match summary
The dominant Edinburgh side powered eight ahead of their Glasgow rivals at the top of the Scottish Premiership to bolster their early-season title credentials and deepen the struggles around Brendan Rodgers' side.
Alexandros Kyziridis' fine strike and a spot-kick from Shankland gave Derek McInnes' side a two-goal advantage that the reigning champions could not overcome.
Dane Murray - among three youth players in the Celtic starting lineup - slashed into his own net early on to put the home side ahead at a energetic Tynecastle, and it was the youngster's infringement that led to the penalty.
A stylish finish from McGregor of the season had quickly cancelled out the first goal, and Benjamin Nygren almost put Rodgers' team in front, opting for finesse over power and allowing Alexander Schwolow to save from close range.
But Derek McInnes' irrepressible Hearts regained dominance to hand the visitors to successive league defeats for the initial occasion since 2023.
It also gives the Hearts a significant lead at the top of the table.
The previous occasion they were so far clear was in 2005-06 under George Burley, when they ended as runners-up - a rare instance that a team has failed to win the title having held such a lead in the past 27 years.
McInnes, whose Aberdeen side were runners-up to the champions on multiple times, has been working hard to downplay championship discussions, as Hearts seek their first top-flight crown since the 1960s.
Rodgers has experienced this previously at Celtic - both perfect and shaky beginnings to a season. He's yet to finish second best.
But on Sunday's evidence, this Edinburgh outfit showed they need to be taken seriously.
Hearts started with the confidence of a side unbeaten in the league this season - the popular attacker delivered a ball for Shankland to stab wide.
Celtic didn't aid their cause with some unusual sloppiness in possession and they buckled under their first real examination.
Claudio Braga's header was tipped onto the woodwork by the Celtic keeper and the follow-up from Shankland was turned into the net by the unfortunate Murray, in for the absent center-back.
Celtic found their rhythm and started stringing passes together. From one such move, the midfielder released the full-back to square for McGregor, who slotted home.
Aside from the Nygren chance, the visitors struggled to create much for striker Kenny or his substitute Yamada amid the unavailability of stricken attackers Kelechi Iheanacho and Daizen Maeda.
The home team regained their intensity and adaptability in attacking from across the final third. The Greek forward, a standout performer of the club's scouting network, struck low past Schmeichel from the just outside the area.
Immediately after, the defender fouled Braga in the right side of the box and the penalty taker converted. And it could've been an even more handsome win, had substitute Ageu not been denied by Schmeichel.
The visitors' performance after the break was somewhat summed up in two incidents involving record signing Arne Engles.
The set-piece from Engles delivery was in sharp opposition to his midweek exploits in the continental victory over Sturm Graz and the national team player was then yellow-carded for a cynical foul.
The Hearts manager: "The effort from the squad is evident, the team spirit. That's not sufficient on its own to win games week in, week out.
"What we have got, is skillful players. You're seeing that from a lot of players who have been here previously. Some of the new signings are keen to demonstrate their quality.
"We're in a positive moment at the minute, but it's just one win. It's crucial for us to maintain this form. We've got much work ahead, loads to do. After the first two rounds is normally an indication of your standing."
Celtic manager Brendan Rodgers: "The second goal was disappointing from our perspective. We failed to push up when the play was recycled as a line so when they play it, they should have players offside but didn't. We have got to improve with the attempt.
"Plenty of matches to play for. It's still so early. It's only nine games in. Obviously, being eight adrift is not ideal. The positive is there's numerous fixtures to play.
"We now have to focus on the present and look to find more consistency and more quality in our play."
The Glasgow club are returning to their stadium on Wednesday against newly-promoted Falkirk (19:45 GMT). At the identical hour in the top division, the Edinburgh outfit are at their opponents' ground.
Elara Vance is a tech journalist with over a decade of experience covering emerging technologies and consumer electronics.