Photographs captured by the Associated Press and other news outlets showed the two leaders talking briefly after sharing the gesture, which occurred as the leaders prepared for a private bilateral meeting amid the summit.
Mr Biden, wearing a mask, is seen talking to the maskless Turkish leader and sharing smiles with Mr Erdogan.
Their friendly chat came despite reports that Mr Erdogan plans to express his displeasure with Mr Biden over the US’s recognition of the Armenian Genocide at their upcoming meeting.
The president himself referred to the actions of the Ottoman Empire as a “genocide” in a statement in April marking the anniversary of the killings.
Some experts have said that while Mr Erdogan plans to enter the meeting and express his opposition to the US declaration, the Turkish leader is also hoping to show critics at home an improvement to US-Turkey relations at the summit.
“The Turkish president is desperate to offer this meeting to domestic and global investors as proof that bilateral relations are improving,” a former member of Turkey’s parliament, Aykan Erdemir, told The Hill.
The US president, meanwhile, is seeking to reinforce America’s commitment to the alliance after four years of President Donald Trump, who famously trashed US participation in NATO and blamed other member-states for insufficient contributions.