Moctezuma II (also known as Montezuma II) died when the Spaniards under Hernan Cortes conquered Tenochtitlan. The exact way in which Moctezuma died is not known for certain.
The most common story about Moctezuma's death is that the Spaniards tried to have him address the attacking Aztecs to urge them to stop fighting. He was apparently struck by rocks thrown by the Aztecs and died a few days later.
However, there is no concrete proof that this happened. It could just as well be that Moctezuma was killed by the Spaniards because he would not cooperate with them.
So, the exact circumstances of Moctezuma's death are not known, but he died as a result of the Spanish conquest.