Gomez said Markey has spent decades in Congress building up a campaign war chest of special-interest money. Gomez said it's the "height of hypocrisy" for Markey to talk about a pledge to limit spending.
Markey has warned that without a pledge, groups like the National Rifle Association and the oil industry will pour millions of dollars into the race.
A similar pledge was signed last year by Scott Brown and Elizabeth Warren in their U.S. Senate race. Markey and fellow Democrat Stephen Lynch also signed a pledge during their party primary, which Markey won.
The special election is June 25.