Brooks was with the Wales squad last week but left international duty and underwent a medical examination, which found he has stage two Hodgkin lymphoma.
The 24-year-old will undergo treatment next week.
He said in a statement: "This is a very difficult message for me to write.
"I have been diagnosed with stage two Hodgkin lymphoma and will begin a course of treatment next week.
"Although this has come as a shock to myself and my family, the prognosis is a positive one and I am confident that I will make a full recovery and be back playing as soon as possible.
"I'd like to show my appreciation to the doctors, nurses, consultants and staff who have been treating me for their professionalism, warmth and understanding during this period.
"I want to thank everyone at the Football Association of Wales because without the swift attention of their medical team we may not have detected the illness.
"I'd also like to say thank you to AFC Bournemouth for all their support and assistance this past week.
"Although I appreciate that there will be media attention and interest, I would like to ask that my privacy is respected in the coming months and I will share updates on my progress when I am able to do so.
"In the meantime, thank you to everyone for their messages of support – it means so much and will continue to do so in the months ahead.
We can confirm that midfielder David Brooks has been diagnosed with Hodgkin Lymphoma.— AFC Bournemouth 🍒 (@afcbournemouth) October 13, 2021
We’re all behind you, Brooksy ❤️#afcb 🍒
"I look forward to seeing you all again and playing the sport I love very soon."
Brooks joined Bournemouth from Sheffield United in 2018 and enjoyed an impressive first season with the club, scoring seven goals and assisting five in 33 games in all competitions.
Injuries limited Brooks the following year as Bournemouth were relegated, but he impressed again in the Championship, this time with 13 goal involvements across all competitions.
This term, he has three goals in nine matches.