Cpl Michael Thacker, of 1st Battalion The Royal Welsh, was shot on 1 June while manning an observation post in the Helmand district of Nahr-e-Saraj.
The 27-year-old lived in the Keresley area of Coventry with his wife Catherine and two-year-old daughter Millie.
His funeral was held at the city's cathedral at 14:45 BST.
Born in Swindon, Cpl Thacker was educated in Cwmbran, south Wales, before joining 1 Royal Welch Fusiliers in 2004, which later became the 1st Battalion Royal Welsh.
He was on his third tour of Afghanistan when his observation post Tir came under small arms fire.
He was airlifted from the scene, but despite medical attention he later died from his injuries.
His younger brother Cpl Matthew Thacker is also a member of the battalion and described Michael as a "true hero", who loved his job.