Understone Keep in Markarth, in the last room of Calcelmo's Laboratory. It is to the right when facing the door to the balcony. When using Destroy the Thieves Guild, the cube will instead be in Birna's Oddments in Winterhold. It can either be bought or stolen.
Picking it up will add a miscellaneous task to take it to Delvin Mallory, who will pay a leveled amount of money for it.