If I'm understanding the OP, he isn't planning to pull money from the 401k. Just not contribute as much, with the intention of instead putting that money towards paying off the mortgage sooner. So no withdrawal fee, and whatever he has in the market will still continue to grow.
I guess if he's still contributing the min amount so as to get full employer match, then it's just a gamble on return. If he was say 5 years out from retirement, then anything he adds now may not be making much in growth (and certainly won't have time to grow). Low return, and so maybe paying on the mortgage will reap the reward he is after. If he thought the market was going to take a dip in the near future, meaning what he puts in now will again not much make much, then same story.
But if he's 10+ years out from retirement... maybe the satisfaction of paying off sooner outweighs future extra dollars? Maybe invest less for a few years, pay off mortgage so as to make his outgoing money less dictated by debt, and then afterwards invest however he sees fit. Once that mortgage is gone, he could change jobs, retire, whatever--his expenses go down, and that might feel really good.
Every investor is different and has different risk thresholds. I'm not sure I'm seeing a foolish move here, just maybe one that won't maximize (potential) growth.