Former party leader Mark Durkan, who has been the MP for the area since 2005, lost out by just 169 votes to Elisha McCallion of Sinn Féin.
Londonderry's city seat had been coveted by the SDLP since their party founder John Hume was elected in 1983.
All 18 of Northern Ireland's MPs have been confirmed with the SDLP and Ulster Unionist Party the biggest losers.
At the last general election in 2015, Mr Durkan was 8,000 votes clear of his nearest rival with 42% of the vote.
"I cannot tell a lie," he said in his concession speech.
"I cannot say it doesn't hurt but I absolutely want to begin by congratulating Elisha McCallion and agreeing with her that what she has achieved tonight is a privilege, to represent the people of this city."
The Foyle turnout was 65.60% - up from 53.58% two years ago.
While not exactly a political newcomer, Ms McCallion only became an MLA at Stormont earlier this year following the death of Martin McGuinness.
In an emotional speech after the result, she recognised Mr Durkan's contribution to political life in the North West.
"Mark has been a public representative in Derry for a large number of years and he has served it well," she said. "But I can't not express my extreme delight at being the first ever republican MP ever elected in this city."
Mr Durkan said one of the reasons for his defeat was greater campaign funding by Sinn Féin.
He also felt that a reluctance from other parties to engage in a "progressive alliance" along pro-EU lines had been damaging.
"We were faced with a huge effort and a huge spend by Sinn Féin, they targeted the constituency very well and put huge resources in here," he told the BBC.
"It's a big part of it, if we can't match that spend or that spin."
SDLP leader Colum Eastwood, who also hails from Derry, will now have a big job on his hands to pick the party up from their Westminster whitewash.
Stephen Pound, the Labour MP for Ealing North and shadow minister for Northern Ireland, said Mr Durkan's loss from the house of Commons would be keenly felt.
"Mark was without a doubt one of the finest speakers in the House of Commons, he was also the inventor of these incredible 'Durkanisms'," Mr Pound told BBC Radio Foyle.
"He was one of the few people that made everybody stop rustling the papers and look up when he started speaking, he'll be missed greatly.
"We've lost a unique voice. He was a damn fine speaker and a very, very good friend."
After almost four decades in power, the SDLP has lost its Westminster seat in Foyle.