It's great that you would like to help your mentor, but this is a tricky issue.
First, writing a good nomination is not easy, and it's far from obvious what the conventions are. If you don't get advice and guidance from someone more experienced, you are unlikely to write a successful nomination.
Second, nominators are usually senior and accomplished academics, typically fellows themselves or scholars of equivalent stature. (I don't know for sure about the ACM, but this is the case for analogous mathematical societies.) This isn't strictly necessary, but the committee will generally not have any expertise in the specific subject matter of each nomination, so they need to be able to rely on the judgment and perspective of the nominator. If you are young or inexperienced, then the committee will be much more skeptical of your nomination. In extreme cases they might not take it seriously at all.
In case the fellow title may not be granted to him, could this fact hurt his reputation?
That won't be a problem in itself. However, the situation might look bad to the committee. Self-nominations are generally highly discouraged, if they are allowed at all, so people who wish to become fellows sometimes ask other people to nominate them. The committee might wonder whether your mentor asked you to do this, in which case choosing someone inexperienced could make your mentor look unwise.
When you are nominating a professor for a fellow title, do you need to ask permission to him? or should I keep the process in secrecy?
You don't need to ask permission in general. It's unclear to me whether you should do so here. On the one hand, it's an unusual situation and your mentor might prefer not to be nominated under these circumstances. On the other hand, he might feel put on the spot, having to either agree to be nominated or find a tactful way of declining.
My recommendation is that you should find another way to express your gratitude, since this nomination is unlikely to work and could be awkward. (But I don't mean this as criticism: there's no way you could have known this without more experience.)
Instead of writing a nomination yourself, you could talk with other faculty about whether they would be willing to do it, but don't push them if they seem reluctant.