From Chinese chess (象棋): the cannon (炮) attacks by jumping over a piece, but if you move the horse (马) away first and then fire the cannon, it is too late to be effective. Hence 'firing the cannon after the horse moves' = acting too late.
usage
放马后炮 (fàng mǎhòupào) is the verb form — 'to do/say something after the fact when it is no longer useful.' Similar to English 'Monday morning quarterback.'