It's a flintlock that's been converted...like this one but it's not this Harper's Ferry- the lock is flat, not rounded...nor one of the obvious ones: British, French, Austrian. It looks more like an early-style percussion lock ( like an 1842 Springfield) that's been altered and mated to a converted flintlock barrel... the whole gun could be an assemblage of parts. Best bet would be to remove the loose rust on the lockplate behind the hammer, and do the same for the underside of the barrel, near the breech, and see if you can find numbers, markings, proof-stamps.
The rear sight is rather odd, too, mounted on the tang, not further up on the barrel. It indicates it's a rifle, but I don't know of anything- like a Common Rifle- that had a sight like that.