In 1842, he moved to Milan, where he found employment in the private asylum Villa Antonini (hospice of San Celso), of which in 1847 he was promoted to "assistant director", then beginning his study of mental alienation.He also undertook the practice of general medicine, surgery, and anatomical exercises at the Ospedale Maggiore, collaborating with the new medical journal of Milan, founded by his friend Agostino Bertani and directed by Panizza. He participated in the congresses of Italian scientists. During the 1844 Milan convention, he participated in the Natural and civil news on the Lombardy of Carlo Cattaneo (whose second volume never came out). He wrote his beliefs about the Stabilimenti Pei Pazzi, a matter he previously discussed in the Gazzetta Medica of Milan with the title of Historical notes on the establishments of the madmen in Lombardy. While adhering to the ideals of the "Risorgimento", he did not take part in the Five Days of 1848 in the newly liberated Milan but was still appointed director of the public asylum of the Senavra by the provisional government. In 1849–1850, following the closure of the University of Pavia, he taught human anatomy in the newly created school of medicine, surgery, and pharmacy in the Ospedale Maggiore. In the following summer of 1850, he was sent by the same hospital to visit asylums in Switzerland and other European countries to study their organization and evaluate a reform of the Senavra. His experience as an asylum director convinced him more and more of the need to reorganize Italian asylums, transforming them into real tools for the treatment of insanity and into research and teaching centers for the nascent psychiatry, which still did not find space in universities.