Steven Thomson, 29, is accused of murdering Duncan Banks by repeatedly hitting him on the head with a blunt object and robbing him of a money, heroin, a wallet and a key.
The offence is alleged to have taken place on 27 September 2015 at Skye Road, Dunfermline.
Defence counsel Susan Duff entered a not guilty plea on behalf of Mr Thomson at the High Court in Glasgow.
Judge Lady Rae set a trial for the High Court at Livingston in January next year.
The body of Mr Banks was found in his Skye Road flat in Abbeyview on 28 September last year.
His mother, Dorothy, made a plea for information following his death while police targeted 3,500 homes in the Dunfermline area as part of a leaflet campaign.
A man has denied murdering a 39-year-old man in his Fife home.