It will be the third time the event has taken place in the United Kingdom, and the first time in Scotland.
The 2018 edition - the most recent one - was held in Birmingham, which was also the host venue in 2003.
Glasgow hosted the European Indoor Championships in 2019 and the 2014 Commonwealth Games.
Scotland's First Minister Nicola Sturgeon was quoted on britishathletics.org.uk, where she said: "I'm delighted that Glasgow has been chosen to host the prestigious World Athletics Indoor Championships in 2024.
"This will underline Scotland's global reputation as the perfect stage for events and is welcome news as we look to recover from the pandemic."
UK athletics chair Ian Beattie said: "We are delighted to be awarded the opportunity to host the 2024 World Athletics Indoor Championships. World Athletics have demonstrated their confidence in the UK to host global athletics championships once again, and history has shown time and time again our ability to deliver amazing events.
"We're thrilled with the outcome and look forward to a successful championships working alongside our partners that will truly give all athletes a fantastic stage upon which to perform."
The event will be held in the Emirates Arena, a world-class athletics venue which is located on London Road in Glasgow.
The next World Indoor Championships are scheduled for Belgrade in March, and Nanjing is then set to host the event a year later. Nanjing was originally due to be host in 2020 before that got moved due to the coronavirus pandemic.