"Trump you failed to protect your nation," it read. The post by Akayed Ullah was revealed in charges filed by federal prosecutors on Tuesday.
They say the 27-year-old Bangladeshi immigrant carried out the bombing inspired by the Islamic State group.
He wounded himself and three others in Monday morning's attack.
Mr Ullah is accused of blowing up a crude device strapped to his body in an underpass at Manhattan's Port Authority Bus Terminal during the rush hour.