Edit: I took "The dog barked at nothing" as "The dog barked at a place where there is nothing." Sorry if I have misunderstood.
I think there is no word in Japanese that exactly matches that "nothing." So you have to describe the situation more concretely. For example:
犬が何もない所に向かって吠えた。
The dog barked at nothing.
Here, 「Aに向かって吠える」 is a typical translation of "bark at A". And 「何もない所」 is "the space where nothing exists."
Maybe, the word 「[虚空]{こくう}」 (== empty space) is closer:
犬が虚空に向かって吠えた。
But this word sounds literary; not used in daily conversations.
Or 「[無]{む}」 may express the idea of nothing being existing (cf. 無を取得) but it sounds too paradoxical and less natural.