The artwork, titled DHEAD, was donated for the fundraising ARTAID 98 exhibition in the city in 1998.
Bowie died on 10 January this year after a private 18-month battle with liver cancer.
His portrait is going on sale at Lyon & Turnbull's contemporary paintings sale next week and is valued at between Â£3,000 and Â£5,000.
A one-time art school student, Bowie's paintings focus on abstract head studies influenced by the bizarreness and esotericism of 1930s era German Expressionist art.
Charlotte Riordan, picture specialist at Lyon & Turnbull, said: "Best known of course as a singer/songwriter, Bowie's entire career was spent actively blurring the lines between the art forms of music, performance and design; the visual playing as big a part as the aural."
A self-portrait by music legend David Bowie is going up for auction in Edinburgh.