Robert Graci, 73, of Scituate, said he used the pallets to create a red, white and blue wall complete with a U.S. flag, the Boston Herald reported Monday.
State troopers had ordered him to get rid of the wooden pallets, which were to be used for Fourth of July bonfires on Humarock Beach.
Graci said city workers would violate his liberty and pursuit of happiness if they destroyed the wall.
"And maybe I'll play 'The Star-Spangled Banner' as they do," Graci said. "You've got to stand for what's right. You've got to stand for what you believe in. Our wall is not a protest, we're celebrating the birth of this nation. But they've got a mandate here and they're making no exceptions."
The Board of Selectmen voted unanimously last month to approve the bonfire ban due to safety concerns and a wind-blown March 8 fire that destroyed four beachfront homes.
Officials said they will remove Graci's wall if it is determined to be a safety hazard.
Notable deaths of 2014 [PHOTOS]