Ibrahim Zadran made 87, Rahmanullah Gurbaz smashed 65 and Rahmat Shah struck an unbeaten 77 to help Afghanistan reach their target.
Afghanistan are now up to sixth in the table, while England are bottom.
Pakistan captain Babar Azam made 74 from 92 balls, but it was not enough to prevent his team from losing.
Teenager Noor Ahmad was the pick of the Afghanistan bowlers, taking 3-49.
This is Afghanistan's first win over Pakistan in ODIs at the eighth attempt.
Pakistan finished off their innings on 282/7 against Afghanistan with the help of a blistering innings in death overs by Iftikhar Ahmed.
In the 22nd match of the 2023 World Cup, Pakistan won the toss and decided to bat first. The Match is being played at M. A. Chidambaram Stadium.
Shadab Khan replaced Muhammad Nawaz.
Pakistan scored 120 runs for the loss of 3 wickets in 25 overs. Imam-ul-Haq was dismissed after scoring 17 runs, Abdullah Shafiq was out for 58 runs, and Mohammad Rizwan was dismissed for 8 runs.
Skipper Babar Azam scored his second 50 in three games and provided stability.
Runs scored by Pakistan batters are as follows:
- Abdullah Shafique: 58 (77)
- Imam-ul-Haq: 172 (244)
- Babar Azam: 74 (92)
- Mohammad Rizwan: 81 (180)
- Saud Shakeel: 25 (34)
- Shadab Khan: 40 (38)
- Iftikhar Ahmed: 40 (27)
Pakistan XI
Abdullah Shafique, Imam-ul-Haq, Babar Azam (capt), Mohammad Rizwan (wk), Saud Shakeel, Shadab Khan, Iftikhar Ahmed, Usama Mir, Hasan Ali, Shaheen Shah Afridi, Haris Rauf
Afghanistan XI
Rahmanullah Gurbaz, Ibrahim Zadran, Rahmat Shah, Hashmatullah Shahidi (capt), Azmatullah Omarzai, Ikram Alikhil (wk), Mohammad Nabi, Rashid Khan, Mujeeb Ur Rahman, Naveen-ul-Haq, Fazalhaq Farooqi