Wal-Mart Stores Inc. is quietly bringing back rifles, shotguns and ammunition to hundreds of U.S. stores as the hurting retail giant seeks to reinvigorate its one-stop shopping appeal and attract more male customers.

The world's largest retailer stopped selling hunting rifles and bullets at all but a third of its U.S. stores five years ago, citing diminishing sales. It is now restoring them to hundreds of locations, bringing the total to nearly half of its more than 3,600 U.S. namesake stores, as part of a larger push to restore...