Originally Barbosa wished to become a lawyer, but after he suffered a bout of pneumonia in New York City, his doctor recommended that he study medicine. In 1877 he applied but was denied admission to the College of Physicians and Surgeons at Columbia University, due to his race. He then applied and was admitted to the medical school of the University of Michigan, where he graduated as valedictorian of the class of 1880. Barbosa was the first person from Puerto Rico to earn a medical degree in the United States. He returned to Puerto Rico, where he set up a practice in his hometown of Bayamón.