Afghanistan, so close to beating England earlier in the tournament but coming into the match off the back of three defeats, won by six runs in a thrilling finish.
West Indies, which still qualifies for the semifinals as group winner, came up short chasing a modest 124 for victory in the allocated 20 overs.
A pair of sixes by Carlos Brathwaite gave the Caribbean side late hope, but he was brilliantly caught by Najib Zadran with 10 runs needed off the final over bowled by the nerveless Mohammed Nabi, who took two key wickets.
Victory sparked scenes of celebration among the Afghanistan supporters in the crowd and its players, who had achieved a first-ever victory over a Test-playing nation other than Bangladesh or Zimbabwe.
After qualifying for the Super 10, two groups of five top cricketing nations, Afghanistan has performed above expectation, extending South Africa and giving England a real scare, reduced to 56 for six wickets before recovering for a narrow win.
Najib, named man of the match, had rescued Afghanistan after excellent West Indies bowling, particularly from spinner Samuel Badree (3-14) left the underdog 76 for five after 15 overs.
Najib hit four fours and a massive six to ensure Afghanistan posted a respectable total.
In reply, the West Indies, which opted to rest star batsmen Chris Gayle, was coasting at 79 for three wickets until losing five further wickets cheaply, leaving Asghar Stanikzal's side deserved winner.
"We were 15 runs short, but we knew the conditions and the bowlers and fielders played very well," said the captain.
Host India knocks out Australia
West Indies will play host India, which beat Australia in a pulsating match to decide the second qualifying spot in Group 2 behind New Zealand, in the semifinals.
The match in Mumbai saw India chase down Australia's score of 160 with captain MS Dhoni hitting the winning runs off the first ball of the last over.
India, which was initially struggling in its reply, owed its victory to an undefeated 82 not out from its talisman Virat Kohli, his innings accelerating in the closing overs. He scored 32 runs off his final 11 balls, with 19 runs coming off the 18th over bowled by James Faulkner to set up victory.
The other semifinal will see England, which eliminated holder Sri Lanka Saturday, play New Zealand.