The trigger guard tang bent out into a sort of pistol grip looks like it started out as an 1849 Austrian musket, with stock shortened for surplus sales.

There were thousands of these and other European rifles and muskets imported by both sides during the Civil War. Which left an awful lot of obsolete surplus guns to sell off after the war with breechloaders coming out.