Here are some ideas to explore...

It might be a mindset issue. Not sure if you've read that or not:
http://www.amazon.com/Mindset-Psychology-Success-Carol-Dweck/dp/0345472322 In that being told he's smart and even "too smart for school" you either can do or can't.

Another possible/related lens: There is no consequence of failure that is anywhere as tragic as bumping into your own limits. i.e. If internally he believes he can do anything, then as long as he doesn't try he never finds limits.

Some of the mindset concepts get into exploring metacognitive skills. Maybe directing him towards metacognitive development along with study skills ex situ will get him to the skills. Rather than hitting a wall he'll have the tools necessary to surmount it. There is a bit of confidence building that works into this.

And opposite that: Is he autodidactic outside of school? If so perhaps his style is so out of whack from school approaches that conformity to a system less effective than his own is trying. Maybe an opportunity to do some school work independently would light his fire.

Maybe he has yet to encounter his bailiwick and is a very intrinsically goal oriented person. Perhaps exploring careers and colleges and talking to people in fields of interest would fire him up.

On the other hand, no harm in being a happy well adjusted (and well paid) computer programmer who might've been a brilliant highly published and respected researcher.