H. R. McMaster's talks with Erdogan's spokesman Ibrahim Kalin in Istanbul come days ahead of an expected visit to Turkey by US Secretary of State Rex Tillerson.
The local government in Afrin accused Turkey of creating a "humanitarian crisis" by killing at least 160 people and displacing tens of thousands since the start of its three-week-old offensive.
Turkish authorities have detained 311 people suspected of disseminating "terror propaganda" over Ankara's offensive against a Kurdish militia in Syria, the interior ministry said on Monday.
Turkish warplanes and artillery took advantage of the clear skies and pounded the hill of Barsaya near the Kurdish town of Afrin in northwestern Syria.
Turkey launched its military operation dubbed "Olive Branch" against the YPG on Saturday, supporting Syrian rebels with ground troops, air strikes and artillery fire.
President Recep Tayyip Erdogan on Wednesday vowed to press Turkey's offensive against a Kurdish militia in Syria until "the last terrorist" was killed, as the US ramped up its concerns over the campaign.
Turkey advised the United States ahead of its air strikes in Syria against US-backed Kurdish militia, and Washington is in contact with Ankara about the way forward, US Defense Secretary Jim Mattis said on Sunday during a flight to Asia.
A powerful Syrian Kurdish militia announced on Sunday it had cleared Islamic State group fighters from key territory east of the winding Euphrates River.
Turkish authorities have placed under arrest a British citizen on charges of links to a Kurdish militia Ankara deems to be a terror group, after detaining him in a raid at a holiday resort, state media said.