Raphael Semmes, CSA. Although his naval exploits are well known, just before the fall of Richmond, after the naval ships under his command were destroyed, he was made a brigadier general and his men turned into infantry. He was supposed to join Lee, but was already cut off, so he and his men escaped south to Joe Johnston's army.
Source:
This is a good question, because Samuel P. Carter, USA, also held commissions in the Navy and Army simultaneously, but he wasn't made admiral until 1881. He was the first to turn up on my google search, and proves that a careful reading of the sources is necessary!