Sale or exchange between two guys is a "private transfer" and is outside the purview of the BATF.
But because nothing is simple or straightforward with the Feds, if you do a LOT of 'private transfers' they'll look into it, not for the transfers but for the "transferring". Lawyer-speak.
Because shipping engages Intestate Commerce, the Feds are all over that, too.
But driving across a state line is not "shipping", nor does it use a common carrier.
Every state has something to say about it. Some have a lot to say; some have nearly nothing to say. Some say it in a very complex way; some in a simple way. Almost all of them operate under the pretense of "if you nudge the bear, you'll regret it."
As a completely hypothetical example, if you have a handgun in NY and you sell/give to someone, even family, in TX, then TX will have nothing to say about it. They don't know or care. But NY will be all over you - they'll need a full workup (nearly a mortgage application) on who is *receiving* this piece. The fact it's leaving and will be beyond their reach is immaterial. And you'll get in plenty of hot water if you don't.
OTOH, if you're in OK and drive to TX with your shooter, then it's no more of a legal entanglement than selling a belt or sweater. OK doesn't know you have it and TX doesn't wanna know. But that's between two guys. FFL transfers are the same everywhere.
Are long guns registered there in MD? My guess is yes, but I dunno. If so, you will have to account for that registration to the state and "I sold it" ain't gonna cut it, probably.
And if you wanna sell it to someone in, say, MA, you got a LOAD of paperwork to do - and with paperwork always come fees.
So there's no right answer to your question without a lot more info.