The 21-year-old singer, who had met Caley Camarillo a few years ago, said in a video message that she was praying for her recovery, reported the Huffington Post.
"Hey Caley, it's Miley. I've been talking to your mama the past few days. I know we met a few years ago, but I just wanted to let you know that I'm still praying for you, I'm still thinking about you.
"I'm sending you some love, and I just wanted to let you know that you are on my mind and in my heart," Cyrus said in the message on June 13.
The 12-year-old girl watched the video before passing away.
Caley was popular on Twitter and Instagram, where she shared her everyday experiences with fans and supporters, and also used the platforms to raise awareness about cystic fibrosis.