Boseman had been widely expected to be named the winner for his performance in Netflix film Ma Rainey’s Black Bottom.
Hopkins, who was this year’s oldest nominee at 83, won for drama The Father, in which he plays an elderly man dealing with memory loss. His first Oscar was for 1991 film The Silence of the Lambs.
The actor was not present at the ceremony, with category presenter Joaquin Phoenix saying the Academy would accept the award on his behalf.
Boseman died of cancer in August 2020. His win would have marked the third posthumous acting award following Peter Finch (Network) and Heath Ledger (The Dark Knight) in 1976 and 2008, respectively.
Hopkins won over Boseman, Riz Ahmed (Sound of Metal), Steven Yeun (Minari) and Gary Oldman (Mank).
Frances McDormand won Best Actress for Nomadland, which also took home Best Picture and Best Director for Chloé Zhao.
McDormand had been an outside bet next to favourites Viola Davis (Ma Rainey’s Black Bottom) and Carey Mulligan (Promising Young Woman).
Find a full list of winners here.