If you claim the mortgage interest tax deduction, paying off your mortgage early will lead to a higher tax bill. But you’d actually pay more in interest by keeping your mortgage than you’d  save in taxes.
Let’s say you pay $10,000 a year in interest and you fall into the 25% tax bracket—well, you’d only get a $2,500 tax deduction. It’s a nice perk while you’re paying off your mortgage, but it’s a terrible reason to intentionally keep your mortgage. That would be like trading a dollar for a quarter.