Kausar Saqlain, a lawyer practising in the Sindh High Court, was driving his sons to school when gunmen riding a motorcycle attacked his vehicle near Mauripur Road in Karachi.
The two boys were killed instantly while Saqlain sustained severe injuries.
He was taken to a nearby hospital, where he succumbed to his injuries.
Police described the incident as a sectarian attack.
Lawyers' organisations called a strike to protest the killings.