Sam Heathcote's own goal sent Brentford into the Emirates FA Cup Fifth Round at Macclesfield's expense as the non-League side's unforgettable run was brought to an end.
The sixth-tier hosts, who famously knocked out holders Crystal Palace in the Third Round Proper, kept their Premier League visitors at bay for 70 minutes before Heathcote headed into his own net.
It proved enough to settle a tight contest, with a trip across the capital to West Ham the reward for Brentford, but the Silkmen received a deserved ovation from their supporters at the full-time whistle after once again putting in a fine display against a top flight side.
The hosts started brightly and created the game's first chance when captain Paul Dawson, who netted against the Eagles, headed a free-kick over the bar.
Luke Duffy was next to fire a warning shot, seizing on a loose Brentford pass 20 yards out and firing off target, before Dawson came within inches of giving his side the lead after picking up possession outside the area and fizzing a low shot just the wrong side of the post.
Having survived several early let-offs, Brentford - who sit seventh in the top flight - began to settle and came close themselves when Reiss Nelson saw an effort kept out by goalkeeper Max Dearnley.
Heathcote saw an effort blocked in the closing stages of a first half in which the National League North side acquitted themselves superbly, and they were straight on the front foot in the second as well with Duffy striking wide.
The Silkmen had to put bodies on the line around the hour mark as Brentford began to apply pressure with a series of shots on goal, former Manchester United defender Cameron Borthwick-Jackson doing well to turn away a dangerous Michael Kayode cross.
The Bees dominated possession as the hosts tired and the breakthrough came with 20 minutes to play. Aaron Hickey found space down the left and crossed towards the near post, where a diving Heathcote, a PE teacher by day, powered an unfortunate header past the helpless Dearnley in front of the travelling fans.
D'Mani Mellor saw a shot blocked as Macclesfield, whose journey in this year's competition began in Second Round Qualifying in mid-September, sought a response and they had several opportunities to flood the box late on from set pieces.
But Brentford, who could have doubled their lead when Yehor Yarmoliuk spurned a presentable chance, held firm to book a spot in the Fifth Round for the first time since 2018-19.