When you hit with a ranged attack using this weapon, it deals an extra 1d8 damage or, if the target is a giant, 2d8 damage. Immediately after the attack, the weapon flies back to your hand.
It can be found in the Dungeon Master's Guide on page 167
Unfortunately, it does not deal damage on the return, but if you have Extra Attack, you could simply pretend it did. Your second attack would literally be a second throw, but you can narrate that as it dealing damage on the way back.
But that is a hammer and/or I'm not a dwarf
Talk to your DM about changing the specifics of the weapon (a battleaxe is fundamentally the same as a warhammer). It won't change balance too much.
Changing the bonus against giants to another creature type for flavor reasons (with DM permission) would also not make a substantial difference (just be wary about the varying power of certain creature types depending on the proportion of enemies in your setting/campaign).
Note: a variant that doesn't have the dwarf limitation and has a different creature type for the extra damage MIGHT be bumped up to Legendary rarity by your DM. Just making you aware ahead of time