I heard according to our sages of blessed memory that when Moshiach comes everybody will live forever, so will Moshiach be immortal?
That depends on the view of what will happen once Mashiach comes. Rambam says that the world will continue (for a certain time) under the Mashiach (as the king on the throne of David) and his descendants. Thus, if people will still die (though at a much greater age like before the flood) so will the Mashiach. Only those who say that nobody will die would say that mashiach will be immortal.
Among the commentators on the Bible, Maimonides has an unusual interpretation. He says that the verse of Isaiah is not necessarily to be taken literally: "It is inevitable that a person will die and return to that from which he was formed." He does agree that in the Messianic era, "man's life will be lengthened" and death will be considerably delayed, but in his opinion, everyone will eventually die. According to his theory, even "Moshiach will die, and his son will rule after him, and then his grandson."
However, the majority of commentators reject the view of Maimonides. Chief amongst them is Nachmanides, together with many leading Kabbalistic and Chassidic masters. According to their view, the ultimate perfection will be in the days of Moshiach, when all souls will descend from the Garden of Eden and will return to be enclothed in bodies. Death will vanish completely and all of us, with Moshiach at the lead, will live forever.
(Isaiah 25:8. Midrash Tanchuma, parshas Yisro. Shabbos 152:2. Maimonides' commentary on the Mishna, Sanhedrin 10. Iggeret Techiyat Hameitim of Maimonides. Shaar Hagemul. Derech Mitzvotecha, Mitzvat Tzitzit. Torat Menachem 5748, vol. 2, p. 273. 5752, vol. 1, p. 186)