A.P. Hill, whom if I recall correctly featured in "orders" given by both Stonewall Jackson and Robert E. Lee as they were dying. Poor guy, still being ordered around by Lee even after the war was over...
Hah!! One I can answer without even having to look! (But will do because of giving quotes as proof). And I cannot believe it myself, I remember it from a thread that was started almost 3 years ago by @War Horse - but cannot remember my shopping list I left home this very morning! I think that is called selective perception!
The officer mentioned by two dying generals was Ambrose Powell Hill.
And Stonewall Jackson also, in his agony, issued order to A.P. Hill.
"His personal physician, Dr. Hunter McGuire, noted his final words.
"A few moments before he died he cried out in his delirium, 'Order A.P. Hill to prepare for action! Pass the infantry to the front rapidly! Tell Major Hawks' -- then stopped, leaving the sentence unfinished. Presently a smile of ineffable sweetness spread itself over his pale face, and he said quietly, and with an expression, as if of relief, 'Let us cross over the river, and rest under the shade of the trees." http://www.brotherswar.com/Chancellorsville-7.htm
Charles Edward Hazlett was summoned to talk to Steven Weed after Weed was mortally wounded on LRT. Hazlett was mortally wounded as he listened to Weed's last words.
Weed's last words were reported as "I would rather die here than that the rebels should gain an inch of this ground." Lt. Hazlett was killed trying to hear what Weed was saying.