Like the origin of botamochi, red azuki-an reminded people of hagi flower which had red-purple blossoms in the higan of fall, therefore, mochi with azuki-an made in fall began being called ohagi ('o' is a prefix).
牡丹餅と同じく、小豆餡の様子を秋の彼岸の時期に咲く萩の花に見立てたことから。