Captain Paul Dawson and Isaac Buckley-Ricketts struck in each half as the home side - coached by Wayne Rooney's younger brother John - stunned Premier League side Palace, a team 117 places above them in England's football pyramid.
"I can't believe it, we never thought we would be in this position," John Rooney told the BBC. "We were incredible from the first minute. I thought we were deserved winners. I couldn't be any prouder of the lads."
Dawson rose to head home a lovely curled free kick from Luke Duffy in the 43rd minute. Buckley-Ricketts doubled their lead in the 60th minute when he twisted his body to wrong-foot Palace goalkeeper Walter Benitez in front of a delirious crowd at Moss Rose, the site of a children's under-nines practice earlier in the day.
Palace's Yeremy Pino scored with a stunning free kick in the 90th minute to make for some nervy added-time minutes.
"I was surprised (with the win), the gaffer gave us a game plan and we all stuck to it," said Dawson, who played most of the match with a bandaged head to cover a gash.
"Macclesfield means the world to me. It's an immense achievement. I am proud of the boys and proud of the fans. It's a really big community club."

Palace boss Glasner had made six changes to his team from Wednesday's scoreless draw with Aston Villa. He sent on reinforcements in Will Hughes, Tyrick Mitchell and Brennan Johnson to start the second half, but the changes made little difference as the visitors, who are 13th in England's top flight, looked rattled.
Glasner said they had deserved to lose.
"We had no kind of quality today and I saw no one who could win a dribble. Then conceding set goals and timing in the header," he told the BBC. "If you can't create clear chances, it is a lack of quality that we have shown today. We deserved to lose. I have no explanation for what I have seen today."
Macclesfield are the first non-league team to eliminate the FA Cup holders since Crystal Palace knocked out Wolverhampton Wanderers in the 1908-09 first round.
Arsenal were the last holders to go out in the third round, in 2018.
The victory was the latest chapter in a remarkable rise for Macclesfield, who were expelled from the National League five years ago, with debts totalling more than 500,000 pounds. The club was purchased by local businessman Robert Smethurst and Macclesfield entered the ninth tier in 2021-22, winning three promotions in four seasons since.
They were also playing with heavy hearts after 21-year-old forward Ethan McLeod died in a car accident while travelling back from an away match last month.
