Bush and his wife, Barbara Bush, attended the ceremony joining Bonnie Clement and Helen Thorgalsen as private citizens and friends on Saturday, said spokesman Jim McGrath.
Thorgalsen posted a photo on her Facebook page showing Bush signing the marriage license as a witness. She captioned the photo: "Getting our marriage license witnessed!"
In the photo, Bush is seated in a wheelchair, a stack of papers on his lap and his left hand poised with a pen. One bright red sock and one bright blue one peek out below the cuffs of his blue slacks.
The 41st president has deep ties to the area and owns a compound in Kennebunkport, a small coastal town. Thorgalsen and Clement own a general store in neighboring Kennebunk. They were honeymooning overseas and didn't immediately respond to an email seeking comment Wednesday.
Gay marriage became legal in Maine in December.
Bush was in the White House when gay marriage wasn't as big a political issue as it is today. One of his sons, former President George W. Bush, opposed same-sex marriage and in 2004 announced his support for a proposed constitutional amendment to outlaw it. But his wife, Laura Bush, and their daughter Barbara Bush support gay marriage, as does his former vice president, Dick Cheney, whose daughter Mary Cheney is openly gay.
A spokesman for George W. Bush on Wednesday declined to comment on his current feelings about same-sex marriage or his thoughts about his father's role in a same-sex wedding.
In July, George W. Bush made headlines when he said he wouldn't comment on the issue, saying he "shouldn't be taking a speck out of someone else's eye when I have a log in my own." He later explained that he just wasn't going to answer the question because he was out of politics.
His brother Jeb Bush, a former governor of Florida and a potential presidential candidate, has said same-sex marriage is an issue best left to the states to decide. In a speech in June, he told the Faith & Freedom Coalition the nation needs to be supportive of non-traditional families.