Due to political turmoil, his family moved to Barcelona when he was still a baby. He showed some talent for art at an early age and was apprenticed to a silversmith. Later, in 1850, he attended the Escola de la Llotja, where his primary instructors were Claudi Lorenzale and. One of his fellow students was Marià Fortuny, who went to Rome on a scholarship to continue his studies and suggested that Moragas come there too. In 1858 he did so, despite having no financial resources. Later, he was joined by some of his friends from the Escola, and they set up a studio just off the Via Flaminia. He also attended classes at the Accademia Chigi. During this time, he walked throughout Rome and its environs; making sketches that he would turn into oils and watercolors, then send to art dealers in Paris and London. In 1864, he returned to Barcelona, where he held his first exhibition, at the silversmith's shop he had worked in as a boy. At this time, most of his works were of the costumbrista school. Two years later, with a recommendation from Fortuny, he exhibited at the studios of Federico de Madrazo in Madrid. The following year, he participated in the National Exhibition of Fine Arts, where he obtained a first-class honorable mention. In 1869, he married Elvira Pomar; daughter of the silversmith. He then returned to Rome, where he developed an interest in Orientalism but, due to a cholera epidemic, he was forced to relocate to Naples. There, he came under the influence of the Naturalist painter, Domenico Morelli. In 1870, he and Fortuny visited Morocco, where his interest in the Orient was rekindled. After a short stay in Barcelona, he was back in Rome in 1873; beginning his most productive period. Fortuny died in 1874, and Elvira became ill, so he returned to Barcelona and settled there permanently. She died in 1877, and he never remarried. He opened a private drawing and painting school; attended by Santiago Rusiñol and Hermenegildo Anglada Camarasa, among others and, after 1877, served as a Professor at the Escola. From 1882, he held the same position at the "Escuela de Artes y Oficios" in Vilanova i la Geltrú. In 1883, he created the "Centro de Acuarelistas" which later became the Cercle Artístic de Sant Lluc. In 1888, he was artistic advisor for the Barcelona Universal Exposition.