Rather than roll the stock into an IRA, you choose to have the shares sent directly to you or your brokerage account. In this scenario, you would incur taxes on a $5,000 retirement distribution, but you wouldn't be taxed on the gain until you sold the stock. If and when the stock is eventually sold, the gains would be treated as capital gains rather than ordinary income.
There are a number of things to keep in mind before utilizing the NUA strategy: First, many 401(k) plans don't enable an employee to purchase their stock; rather, the plans have a "fund" that mimics the performance of the stock. It's very important to verify that your plan provides actual company stock.
Read MoreLackluster savings tarnish golden years
Second, having stock distributed rather than rolled over to an IRA can result in a hefty tax bill. A large distribution could push you into such high tax rates that the current taxes would offset any savings that NUA could offer.
Careful planning is necessary when evaluating this technique, but it can work wonders in the right situations.