McGuinness will attend the banquet at Windsor Castle being thrown for the state visit of Irish President Michael D Higgins, the first time the republic's head of state has made such a trip.
The move will be seen as a landmark in the peace process in Northern Ireland, which remains part of the United Kingdom.
Queen Elizabeth made a historic state visit to the Republic of Ireland in 2011, which helped to heal deep-rooted unease and put Anglo-Irish relations on a new footing.
McGuinness, a former Irish Republican Army paramilitary commander, snubbed the 2011 banquet in Dublin but will attend the return visit banquet at the castle, west of London.
More From This Section
Higgins' four-day state visit begins on Tuesday.
"While Martin McGuinness's involvement in President Higgins's state visit may not be welcome by opponents of change, it is yet another example of Sinn Fein's commitment to an inclusive future based on tolerance and equality," party president Gerry Adams said in a statement yesterday.
Queen Elizabeth met McGuinness when the monarch visited a Belfast theatre in June 2012. They shook hands behind closed doors, and then again before the cameras as the sovereign left the building.
It was seen as a step forward in the Northern Irish peace process and reconciliation between Britain and Ireland. The gesture that would have been unthinkable just years earlier.