This would depend on how "killed in the war" is defined , as is the definition of general.
The last to die from wounds received in battle was "Brevet Brig. General Francis Washburn, Colonel 4th Massachusetts Cavalry, died April 22, 1865, of wounds received in action" - head wound
The last to die 'in combat' was Brevet Brig. (never confirmed but listed as such) General Theodore Read, Major and Asst. Adjutant-General Volunteers, killed April 6, 1865, at High Bridge, Va. - gunfire
If we are wanting a Brigadier or Major General, non Brigadier, killed in action and not listed as mortally wounded, then the answer would be Brig. General Daniel D. Bidwell, U. S. Volunteers, killed Oct. 19, 1864, at Cedar Creek, VA. - struck with artillery fire
Thomas Alfred Smyth (December 25, 1832 – April 9, 1865) was the last union general to be killed when he was shot by a sniper on April 7th as he was scouting near Farmville, Virginia. He was hit on the left side of his face, the bullet taking out a tooth and going into his neck, and he was paralyzed from the damage. After being shot, he was able to talk to his surgeon and was told that survival was slight, he replied “now, Doctor, you know I am no coward, and that I am not afraid to die’ - he did at 4:00 am on April 9th the day of Lee’s surrender. https://irishamericancivilwar.com/2010/08/01/the-last-to-fall-thomas-alfred-smyth-at-farmville/
Brigadier General Daniel Bidwell was killed by a Confederate artillery shell at Cedar Creek 10-19-1864.
There were 2 Brevet Brigadier generals killed later .Brevet Brigadier General ( Major) Theodore Read of Ord's staff was killed at High Bridge , Va. April 5th 1865 . Brevet Brigadier General ( Colonel) Francis Washburn of the 4th Mass. cavalry died of wounds suffered at High Bridge on 4-22-1865.
The last at the time general was Brigadier General (he was posthumously given a brevet major general) Thomas Alfred Smyth was shot through the mouth by a sniper near Farmville Va. on April 7, 65 and died two days later the day of Lee's surrender. I'll also mention there was also Colonel Francis Washburn who was posthumously given a brevet brigadier general rank backdated to April 6, 65 the day he was mortally wounded at High Bridge also near Farmville Va. He died on April 22.
The last killed in action was Theodore Read (1835-1865), killed April 6, 1865, while destroying the bridges over the Appomattox River at High Bridge, Virginia.
The last to die of wounds received in battle was Francis Washburn (1839-1865), 4th Massachusetts Cavalry, mortally wounded in the head and captured in the same action, who died April 22, 1865.
Such a simple question but how you interpret it changes the answer.
The last general to be killed on the battlefield was Thomas Read. On April 6,1864 during the battle of High Bridge, Read was shot by confederate James Dearfield and killed. Read did not linger and died quickly.
Then Wikipedia states that General Thomas Smyth was the last Union General killed in the CW. He was shot on April 7, 1865 near Farmville, Virginia, Smyth was shot through the mouth by a sniper, with the bullet shattering his cervical vertebra and paralyzing him. Smyth died two days later at Burke's Tavern, concurrent with the surrender of Robert E. Lee and his army at Appomattox Court House. He died April 9, 1865. Wiki makes this statement: Smyth was the last Union general killed or mortally wounded during the war, and is buried in Brandywine Cemetery in Wilmington, Delaware.
Then General Francis Washburn was shot on April 6, 1865 but lingered and died on April 22, 1865. He was shot at High Bridge over the Appomattox River near Farmville, Virginia on April 6, 1865. He led part of a mounted charged against Confederate forces that were in superior numbers, and he was mortally wounded in the head and captured. He was returned to Union forces, and was sent home to Worcester, Massachusetts, where he died on April 22, 1865. He was posthumously brevetted Brigadier General, US Volunteers (backdated to April 6, 1865) for "gallant and meritorious services at the Battle of High Bridge, Va.
I am ruling Washburn out since he was promoted posthumously. Since the question says killed and doesn't specify if he was mortally wounded. I will go with Thomas Smyth as my final answer.
Lots of words for such a simple question. Our buddy Joshua Lawrence Chamberlain died in 1914 and this statement was made shortly after his death. A full study of his medical history strongly suggests that it was complications from the wound suffered at Petersburg that resulted in his death. Others died long after the CW ended from war medical complications.
Well , there were several names...
According to the source cited below, the last general who was KIA was Brevet Brig.-General Theodore Read, Major and Asst. Adjutant-General Volunteers, killed April 6, 1865, at High Bridge, Va., while the last general who died of wounds received in action was Brevet Brig.-General Francis Washburn, Colonel 4th Massachusetts Cavalry, died April 22, 1865. https://www.civilwarhome.com/uniongenerals.html
But having pondered over those names, I will go with good old Wikipedia and answer as follows:
1.) According to Wikipedia the last Union General killed in the Civil War was Thomas Alfred Smyth
2) When did he die: he died April 9, 1865
3) How did he die: he had been shot through the mouth on April 7th (one day after the above mentioned Theodore Read) during the Battle of Cumberland Church, with the bullet shattering his cervical vertebra and paralyzing him. He died two days later, on the day of Lee's surrender at Appomattox, from his wound.
Brevet Brig.-General Theodore Read was killed on April 6, 1865, at High Bridge, Va. He died from his wounding in a sharp engagement with Confederate forces under Major General Thomas Rosser. Source
Just in case brevet doesn't count:
Brig.-General Daniel D. Bidwell, U. S. Volunteers, was killed Oct. 19, 1864, at Cedar Creek, Va. General Bidwell was mortally wounded by a Confederate shell while commanding his brigade. Source
Brevet Brigadier General Theodore Read.
April 6th 1865.
At the battle of High Bridge he took command of a small mounted detachment and was killed in an ensuing cavalry skirmish. Some reports indicate that he was killed at the hand of Confederate General James Dearing who also died in the encounter.
General Thomas Alfred Smyth, He was wounded April 7 near Farmville Virginia as part of the battle of Appomattox, the scene of the surrender of Confederate Gen. Robert E. Lee. He died on the morning of April 9.1865. Lee surrendered that afternoon.
April 7, 1865, Thomas Smyth and his men neared the town of Farmville, Virginia, where they encountered heavy fire from the Confederates. While on his horse, Smyth was hit in the mouth, by a sharpshooter. The conical ball had damaged his neck, which resulted in a fractured cervical vertebra. That in turn caused a small fragment of bone to lodge in his spinal cord, resulting in paralysis. His men caught him and brought him to Surgeon-in-chief D.W. Maull (cat. #3955C). The surgeon-in-chief stayed and attended to Smyth, as he was transported to Burkesville Station. Theron Parsons (cat. #3955X) was at Smyth’s bedside. When he regained conscious, he was aware of his wounds, but thought only of his men. On April 9, 1865, at 4 a.m.
Thomas Alfred Smyth
April 7, 1865 - Shot in the mouth by a sniper near Farmville, Va. He died Apr 9, 1865, at Burke's Tavern. President Johnson appointed him a brigadier general posthumously with a date of rank of Apr 7, 1865