Can you demote someone and motivate him at the same time? Sure you can. Twice, after firing people, they've thanked me and credited me with getting them on a better path. It's not easy, though, and it has less to do with how you handle the demotion than how you've handled everything leading up to it.
First, you have to have one clearly-communicated standard that you and everyone on your team is expected to meet.
Second, you have to react consistently to every failure to meet that standard, every time, and even-handedly. No favorites, no exceptions, no special treatment. Not even for you.
Third, you have to make every member of your team feel valued not just for his or her work, but for being the person he or she is. Hint: You do that by actually valuing them.
If you follow those three rules, then when you demote a team member, he'll already know that he has not met the clearly-defined standard, and he'll also know, from observation and personal experience, that failure to meet the standard has consequences. Since all of that is out of the way, you can spend most of your time on a pep talk about how valuable he's been and will be again if he can just get on top of this temporary blip in his performance.
If you've genuinely valued him in the past, and you mean what you say, he'll buy it. And you won't have to lead him through a couple weeks of the crabbies before you can start moving the team forward again.