Locatelli began his career with Atalanta, before moving to Milan at the age of 11 years. With the Rossoneri he progressed through each youth category, from Esordienti to Primavera. In March 2015, Locatelli signed his first professional contract with Milan, effective from 1 July 2015 until 30 June 2018.
Milan
Locatelli received his first ever call-up to Milan's senior team ahead of the away game against Udinese played on 22 September 2015; he, however, remained an unused substitute. Later that season, he was promoted into the first team by Milan then head coach Siniša Mihajlović. He made his Serie A debut aged 18, on 21 April2016, replacing Andrea Poli after 87 minutes in a 0−0 home draw against Carpi. On 14 May 2016 he made his debut as a starter, in the last league match of the season against Roma at the San Siro.
2016–17 season
He made his season debut in a 1–0 victory over Sampdoria appearing as a second-half substitute. On 2 October 2016, after coming on as a substitute for captain Riccardo Montolivo, Locatelli scored his first Serie A goal with his first ever shot goal in a dramatic 4–3 win over Sassuolo. Beginning the season on the bench, Locatelli received his first start of the season on 16 October at Chievo, taking over the deep-lying playmaker role in midfield vacated by Montolivo, who suffered a long-term injury over the international break. On 22 October, Locatelli scored with his second ever Serie A shot on target, the only goal in a rival match against Juventus, a strike with the outside of his right foot that hit the underside of the crossbar, and rifled past keeper Gianluigi Buffon. Following a series of excellent performances, Locatelli received and accepted the offer to extend his contract until 30 June 2020, with the rise in pay. On 25 January 2017, Locatelli was sent offfor the first time of his career after receiving two yellow cards in 2016–17 Coppa Italia Quarter Final match against Juventus.
2017–18 season
Locatelli began the season as a starter in the second leg of Milan's Europa League qualification match against CS U Craiova, playing a vital role in Milan's 2–0 win on 3 August 2017. However, Montolivo's eventual recovery combined with the arrival of Lucas Biglia and frequent changes of formation under Vincenzo Montella started to limit his playing time. In November 2017, Montella was dismissed and replaced by Gennaro Gattuso who also viewed Locatelli as more of a backup for either Biglia or Montolivo than a starting lineup player. He finished the season with only 15 starts and 18 sub-ins.
Sassuolo
In the summer of 2018, Milan loaned in Tiémoué Bakayoko and suggested that Locatelli joins one of the lower-ranking Serie A teams on loan, preferably without a buy-out option. Locatelli agreed to depart yet submitted a full transfer request, later citing a perceived lack of trust in him from the club as the main reason for his decision. On 13 August 2018, Locatelli transferred to Sassuolo on loan with an obligation to buy. In his debut season for the neroverdi he made 31 appearances and scored 3 goals.
Locatelli is primarily a deep-lying playmaker operating in front of the team's defense, in a role similar to that of Andrea Pirlo. Although not his preferred position, he can also play in 4–3–3 formation as a wing-leaning central midfielder, alternatively known as mezzala. He possesses good vision, passing, ball control, dribbling, as well as a powerful and accurate shot from long range. His reading of the game and ball-winning abilities were described as sufficient for a defensive midfielder. Considered a promising young player, in 2015 The Guardian named him one of the 50 best young players in the world who were born in 1998.