The former homeland security official and Globe columnist did not vote in either the 2010 gubernatorial election, when her former boss, Governor Deval Patrick, was locked in a tight race against Republican Charlie Baker, or in the Senate special election in January of that year, when Republican Scott Brown stunned Democrats by beating Attorney General Martha Coakley, now Kayyem’s rival for the nomination.

Both elections were viewed as major tests for her party. The Senate race was seen largely as a referendum on President Obama, then her boss, and his health care plan, while Patrick’s survival was a matter of faith for state Democrats.

The reason Kayyem missed the votes, her campaign said, was that her family moved to Washington, D.C., where both she and her husband took jobs with the Obama administration, she with the Department of Homeland Security and he with the Department of Justice.

To enroll their children in public schools in Washington, said spokesman Matt Patton, they needed to become residents of the District of Columbia. Massachusetts voting records show she remained registered in Cambridge, where property records show that she and her husband, David Barron, have owned their home since 2004.

Asked whether Kayyem registered to vote in Washington, which elected a new mayor in 2010 and where voting rights are a touchy issue because the Constitution does not grant the district congressional representation, Patton initially said that Kayyem believe she had.

“To the best of her recollection, yes,” Patton said, adding that she had been busy with her job.

But the D.C. Board of Elections said Kayyem had not registered there. “We have no record of the person you are trying to locate,” said Registrar of Voters Karen F. Brooks.

Later, informed of the board’s failure to find Kayyem’s records, her campaign said she did not believe she was eligible to vote in Cambridge, where the couple had rented out their home.

“She did not vote in 2009 or the 2010 elections in Massachusetts because it was her belief she was a resident of Washington,” Patton said in an e-mailed statement.

According to Secretary of State William F. Galvin’s office, Kayyem could have voted absentee, but that vote could have been subject to a challenge before the Cambridge Election Commission, if someone had brought a complaint.

In a Globe review of the voting histories of the 10 gubernatorial candidates, Kayyem’s absences from the polls were particularly notable. In 10 key elections from 2006 through 2013, including party primaries, Coakley and Treasurer Steven Grossman both scored perfect attendance.

On the Republican side, state records showed that Baker, making his second run this year, voted in all the elections the Globe reviewed except last year’s duel between Republican Gabriel Gomez and Democrat Edward J. Markey, which Markey won handily.

Gomez endorsed Baker, but not before sending the maximum allowable $500 donation to independent Jeffrey McCormick, who did vote in last year’s Senate election.

Baker campaign spokesman Timothy Buckley said Baker did vote in that race, casting an absentee ballot. Baker’s ballot was postmarked June 24, the day before the election, and received on June 27, Swampscott town records show. The ballot was rejected.

Democrats Joseph Avellone and Donald Berwick also voted with regularity, Berwick only missing the relatively low-stakes 2010 state Democratic primary, where Patrick was unchallenged from within his own party, and the only contested statewide races were for treasurer and auditor.

Avellone missed that vote, as well as the 2009 special Senate primary, when Democrats nominated Coakley for her match-up against Brown.

Independent candidates Evan Falchuk and Jeffrey McCormick have slightly more complicated records, since neither is enrolled in a party, they are naturally less reliable primary voters. Records indicate how they might have voted only during primaries in which they chose to partake. Falchuk, for instance, voted in the GOP state primary in 2008, while McCormick did not partake, state records show.

McCormick voted in the 2009 intraparty contest that nominated Brown for the Senate, and the 2013 GOP primary that sent Gomez up against Markey to fill the seat that opened when John F. Kerry became secretary of state.