D'Arcy, 35, will call time on a career that has seen him appear 81 times for Ireland, scoring 35 points. He has also toured with the British and Irish Lions twice, and won the Six Nations with Ireland last year.
In an open letter to Leinster supporters, D'Arcy said "I am taking this opportunity to announce that I will be retiring from professional rugby at the end of October. It is a decision that I have not come to lightly, but one that sits very easily with me and indeed with my wife, Aoife, and we are confident that I am making the decision for the right reasons. I would like to thank Leinster Rugby and the IRFU for their support in facilitating this process, which began last summer.
"I am so proud, fortunate and honoured to have represented my province and country for 17 seasons, but I am leaving on my terms, which is how everyone would wish to end their professional rugby careers.
"It has always been an honour to represent my country. "I hope to continue that over the coming months and help to achieve something with this very special group of players and staff at the Rugby World Cup."
D'Arcy made his debut for Leinster in 1998 and has gone on to make 260 appearances for the province.