McGuinness was deputy first minister of the province at the time, a role he relinquished earlier this year.
The image of the British monarch and the former republican fighter turned peacemaker, both of them smiling, was captured by AFP photographer Paul Faith, who was working for the Press Association at the time.
"It was a pretty historic handshake. It was going to be a handshake that travelled around the world. Everybody was on tenterhooks bar those two," Faith told AFP.
McGuinness was deputy first minister of the province at the time, a role he relinquished earlier this year. He died on Tuesday aged 66.
McGuinness, who fought against British rule in Northern Ireland, seemed "quite relaxed" as he shook the queen's hands for the first time but the security guards were visibly nervous, Faith remembered.
"It seemed like it was his calling. It was part of his journey. It was another box being ticked," he said.
McGuinness's Sinn Fein party does not recognise the queen's rule in Northern Ireland but he played a key role in negotiating a 1998 peace agreement.
The handshake was all the more remarkable as the IRA was responsible for the 1979 assassination of Louis Mountbatten, uncle of the queen's husband Prince Philip, with a bomb placed on his fishing boat.
Mountbatten, the last British ruler of India, was also a distant cousin of the queen.
As the queen and McGuinness shook hands, Faith said McGuinness seemed to hold on "a wee bit longer" than usual.
"He was going to make sure I got the picture!" he said.
Faith remembered the queen, who wore a pistachio-green outfit, seemed "bemused".
At another meeting between the two last year, the queen joked with McGuinness about her 90th birthday celebrations, telling him: "I'm still alive!"
After the historic handshake at the Lyric Theatre in Belfast on June 27 2012, McGuinness wished her well in Irish, in a phrase that translates as: "Goodbye and God bless".
The next day, after the picture made front pages around the world, McGuinness approached Faith while he was covering the Irish Open golf tournament.
"Paul, you made me famous again!" he told the photographer, before getting a picture taken of the two of them shaking hands.