A 529 early withdrawal penalty occurs when investment gains are withdrawn from a 529 account before the beneficiary incurs any qualifying expenses, or if they withdraw funds for any of the non-qualified reasons listed above.