Prince Harry, who is marrying Meghan Markle in Windsor on 19 May, was the best man when the Duke of Cambridge married Kate Middleton in 2011.
Prince Harry also joked with reporters stating that he had got down on one knee to ask his brother, who said he was "thrilled" to be asked.
Prince William said he was "working on" a name for his three-day old son.
Prince William and Catherine's third child, who was born on Monday weighing 8lb 7oz, is fifth in line to the throne.
Before his brother's wedding in 2011, Prince Harry said his best man's speech would "dig (Prince William) in the ribs a few times and embarrass him" and "make him lose some hair".
In an interview with Rio Ferdinand in January, Prince William joked that his brother had not yet asked him to be the best man and "it could be a sensitive issue".
More than 600 guests have been invited to the wedding ceremony at St George's Chapel with 1,000 members of the public being welcomed to the grounds of Windsor Castle.
A further 200 guests - including the Spice Girls - have been invited to the couple's evening reception.
In a statement, Kensington Palace said: "The Duke of Cambridge is honoured to have been asked, and is very much looking forward to supporting his brother."
The palace also tweeted a picture of the pair of Princes when they were boys wearing police helmets.
Earlier this week, the palace announced the list of musicians who will be playing at the wedding.
They include a gospel choir and 19-year-old cellist Sheku Kanneh-Mason, who won the 2016 BBC's Young Musician.