Answer:
He was executed by the Spanish colonial government for the crime of rebellion after the Philippine Revolution, inspired in part by his writings, broke out. Though he was not actively involved in its planning or conduct, he ultimately approved of its goals which eventually led to Philippine independence.