Zoe's mom, Leslie, tells us her family was celebrating Zoe finishing 8 months of chemotherapy for stage 4 metastatic bone cancer -- they rented out a lounge area Friday night at the Bourbon Room on Hollywood Blvd.
During his set, comedian Anthony Jeselnikshouted out Zoe, and when Dan caught wind of their celebration ... he went over to her group and sang "Whatever It Takes."
As you can see, Dan shocked Zoe when he came over, said he was super proud of her ... and shared how he's lost friends and family to cancer.
Dan helped launch the Tyler Robinson Foundation after the Imagine Dragons super-fan passed away at 16 from a rare form of cancer. The foundation helps families who have children fighting cancer.
Waiting for your permission to load the Instagram Media.
Zoe's got a pretty inspiring story ... she was diagnosed when she was 15, but she's beating the disease and fighting hard to get back to playing soccer, following her dream to one day play in college.