Masterpiece is often used but is incorrect - a Master Piece is what an apprentice produced at the end of his training, he would produce something to present to his tutor (or Master) to show that he had learned all he could.
Magnum Opus would be the correct term (a large and important work of art, music, or literature, esp. one regarded as the most important work of an artist or writer.)