Dashing in their army uniforms from when they were fellow officers in the Household Cavalry, William, 27, is now serving in the Royal Air Force, while Harry, 25, is currently with the Army Air Corps.
Artist Nicky Philipps, 45, shows the princes at their official residence, Clarence House, London, and said she hoped the painting captured "a behind-the-scenes glance at the human element of royal responsibility and to emphasize their brotherly relationship."
She said she found the princes, who fitted in the sessions between their army commitments, easy to work with for the National Portrait Gallery piece. "They were very good company and, although I was commissioned to paint them in their official context, I hope I have also captured some of the brotherly banter that characterized the sittings."
Sandy Nairne, Director of the National Portrait Gallery, London, added that the work captured them "formally dressed, but informally posed."
William is seen wearing the star and sash of the Order of the Garter, an ancient order of chivalry to which he was installed by his granny, Queen Elizabeth in 2008.