Lyles worked for the city of Charlotte, North Carolina, as a budget analyst, budget director, and assistant city manager. Starting in 2004, she worked as a consulting director for the Lee Institute and then for Flynn Heath Holt Leadership. She was the community outreach director for the 2012 Democratic National Convention.
Lyles was elected to the Charlotte City Council in 2013, and was elected mayor pro-tem in 2015. Following the shooting of Keith Lamont Scott in September 2016, she proposed a seven-point plan to reduce racial and class divisions in the city, parts of which were approved by the council.
Lyles ran for mayor of Charlotte in the 2017 election. She defeated Jennifer Roberts, the incumbent mayor, in the Democratic Party primary election in September 2017 and defeated Kenny Smith, a Republican member of the city council, in the November general election. She is the first African-American female mayor of the city, and also its first former city administrator to serve as mayor.