A little history on Pedro V.
Pedro (16 September 1837 - 11 November 1861) was the oldest son of Queen Maria II and King Ferdinand II. When his mom died in 1853, Pedro was made the King of Portugal until 1861. As Peter was not yet 18, his father ( Ferdinand Saxe Coburg) ruled until Peter turned 18. On 29 April 1858 at the age oft 20 he married Prinzessin Stefanie von Hohenzollern Sigmaringen. The marriage lasted a year until Queen Stephanie died from diphtheria.
Peter was a conscientious and hard-working monarch who, under the guidance of his father, sought radical modernisation of the Portuguese state and infrastructure. Under his reign, roads, telegraphs, and railways were constructed and improvements in public health advanced. His popularity increased when, during the cholera outbreak of 1853-1856, he visited hospitals handing out gifts and comforting the sick.
But Peter also regarded Portugal as backward, corrupt and in desperate need of modernisation. He despaired/disdained his subjects, and held contempt for the politicians, who were, in his opinion, "of such an inefficient breed that he was obliged to intervene". He had a volatile temper and reacted immaturely to criticism.
In short, Peter was a monarch who meddled in politics too often, was too suspicious of those around him and, to a certain degree, disdained his subjects. Yet, he was undeniably gifted, which, far from improving his situation, made it all the more difficult. He had a brilliant mind with liberal views in an unstable and backward Country.
Pedro V, along with his brothers Fernando and Joćo and other royal family members, died of typhoid fever or cholera in 1861.
He has also been on the 1000 Escudos note.

After he died, his brother Luis 1 took over.
If Pedro V had lived there were expectations that he would changed Portugal for the better but he didn't live long enough to make any major changes and his brothers used the crown for personal gain (and many affairs) rather than the good Portugal. The 1800's was a bad time for Portugal, due to the ongoing battles between the liberals and monarchists and the ineffective monarchy.