Give them small, extremely well defined tasks in pieces of the codebase they're probably not familiar with and gradually lower the exactness and well definedness of the tasks, increasing the scope. Use code review to help them BUT make sure they submit things. Do not raise their level of frustration to the point they give up. Worst thing to do is to do it for them. It is important for it to be understood that they will not be blamed, no matter what happens. That means you may need to stand between them and the boss and take flak. And frankly it's a great general idea to never blame anyone for anything short of willful sabotage.
This will mean, for you, to not fix obvious bugs and instead getting this person to do it for you. The first time be ready for something to take a week that you could do in 30 minutes.