Are you legally required to accept an inheritance? How about a gift?

Yeah, that would be treated differently. When money is withdrawn from a 401k, whoever owns the account at that time owes money on the amount withdrawn. (But inheriting the account is not the taxable event). This leads to another example of splitting hairs about legal terminology - they’re paying taxes on the withdrawals, not on the inheritance itself.

No. In the United States, the federal income tax provides for a step up (or step down) in basis upon the death of the owner of a capital asset.

For capital gains purposes, the basis is reset to the fair market value of the asset as of the date of death (or the alternate valuation date of the estate). The estate would NOT pay any capital gains tax unless it sold the asset and the value of the asset increased since the date of death.

However, the estate may need to pay an estate tax (if applicable) based on the stepped up value of the asset.

So for example, say grandma bought a house for $10,000 in 1960 which is now worth $1,000,000. If grandma moves into a nursing home today and gives the house to her beloved granddaughter, who then turns around and immediately sells it for $1,000,000, then granddaughter faces tax on a capital gain of $990,000. On the other hand, if grandma dies today and leaves the home to granddaughter who immediately sells it, there is no capital gain. If grandma’s total estate is under the current estate tax exemption amount, there would be no estate tax either. (However, state inheritance taxes might apply.)

Cite?

Let’s just be clear, even if the 401k passes directly to a named beneficiary, its value is included in value of the estate for estate tax purposes. If the estate were large enough to be subject to estate tax but didn’t have enough assets to pay them, it is possible that the beneficiary of the 401k might have to return some of their inheritance.

Of course, if the beneficiary is a US citizen spouse, the unlimited spousal estate tax exemption does apply.

I may have to withdraw that statement. One can refuse part of an inheritance in most states.