The "Neighbors" star turned 28 on Sunday and took to Instagram to honour his cousin Emily, who lost her battle with the disease two years ago.
Posting a picture of the pair on a beach as kids, Efron wrote, "Happy birthday to my cousin and best friend, Emily, who passed away from cancer 2 years ago - she was 28 like me. We share the same birthday and this day is forever ours."
Efron then encouraged fans wanting to give him a birthday gift to make a donation to Stand Up To Cancer, an organisation which raises funds for cancer research.