Tensions between Portuguese and Brazilians increased, and the Portuguese Cortes, guided by the new political regime imposed by the 1820 Liberal Revolution, tried to re-establish Brazil as a colony.
The Brazilians refused to yield, and Prince Pedro decided to stand with them, declaring the country's independence from Portugal on 7 September 1822. This is now celebrated as Brazil's Independence Day.
On 12 October 1822, Prince Pedro was declared the first Emperor of Brazil and crowned Dom Pedro I on 1 December 1822. A subsequent Brazilian War of Independence spread through northern, northeastern regions and in Cisplatina province. With the last Portuguese soldiers surrendering on 8 March 1824, Portugal officially recognized Brazil on 29 August 1825.
During the last phase of the monarchy, internal political debate was centered on the issue of slavery. The Atlantic slave trade was abandoned in 1850, as a result of the British' Aberdeen Act, but only in May 1888 after a long process of internal mobilization and debate for an ethical and legal dismantling of slavery in the country, was the institution formally abolished.
The foreign affairs in the monarchy were basically related issues with the countries of the Southern Cone with which Brazil has borders. Long after the Cisplatine War, that resulted in independence for Uruguay, Brazil won three international wars during the 58-year reign of Pedro II. These were the Platine War, the Uruguayan War and the devastating Paraguayan War, the largest war effort in the country history.
On November 15, 1889, worn out by years of economic stagnation, in attrition with the majority of Army officers, as well as with rural and financial elites (for different reasons), the monarchy was overthrown by a military coup.(wikipedia.org)