Cabello first rose to fame as a member of girl group Fifth Harmony, formed during the second season of The X Factor in 2012. The group came in third place in the competition, and subsequently signed a recording contract with Syco Music and Epic Records. The group rose to prominence with their breakthrough single "Worth It" (2015), and achieved further success with the US top-ten single "Work from Home" (2016). Fifth Harmony released two studio albums with Cabello in the group, both of which earned gold certifications in the United States. Cabello appeared as a lead artist with Canadian singer Shawn Mendes on his single "I Know What You Did Last Summer" (2015), serving as her first release outside of the group. She next collaborated with Machine Gun Kelly on the song "Bad Things" (2016), which went on to become her first top-ten single as a solo artist. Cabello's solo work led to months of media speculation that she would be leaving Fifth Harmony to focus on a solo music career.
In December 2016, it was officially confirmed that Cabello had parted ways with Fifth Harmony. During an interview with Latina magazine, she commented about her choice and future plans, stating "I needed to follow my heart and my artistic vision. I'm grateful for everything we had in Fifth Harmony and for [this new] opportunity, I am less focused on success and more on doing my best and pursuing my artistic vision to the fullest, wherever that takes me." Her departure from the group was likened to Beyoncé and Justin Timberlake, both of whom rose to fame as part of a group before earning highly successful solo careers.
During the recording of Camila, Cabello was featured in several collaborations. She was featured on the Cashmere Cat single "Love Incredible", as well as the Spanglish "Hey Ma"; the latter was featured on the soundtrack to The Fate of the Furious (2017). She further collaborated with Major Lazer, Travis Scott, and Quavo on the song "Know No Better". The song was a hit in several European territories, most notably the United Kingdom and France. She served as the opening act for Bruno Mars on his 24K Magic World Tour on select dates, performing several songs from her then-unfinished debut effort.