With the appointment, Duque put one of the most senior hardliners in his cabinet at the head of the defense ministry.
The president did not immediately announce who would replace Trujillo at the Foreign Ministry.
The new defense minister is unlikely to make significant policy changes.
Botero resigned last week after the president of the congressional peace commission, Senator Roy Barreras, revealed that Duque had authorized the bombing of a FARC dissident camp that killed at least eight minors in August.
The killing of victims of forced recruitment was only the latest of a series of scandals that had made Botero’s position untenable.
Trujillo takes control of the military and the National Police a week and a half ahead of a national strike and anti-government protests that have left the president visibly nervous.
Duque’s party received an electoral beating in local elections last month and the president’s approval rating sank to a record low in a poll held before the scandal that triggered Botero’s resignation.
Trujillo, an authoritarian dynasty politician, will have the mammoth task of dealing with next week’s protests, improving public security and restoring order in the security forces.
As foreign minister, Trujillo was one of the main promoters of a conspiracy theory claiming that Venezuelan President Nicolas Maduro had teamed up with Colombian ELN guerrillas and dissidents of the demobilized FARC guerrilla group.
The new defense minister also strained foreign relations by demanding Cuba extradite peace negotiators of the ELN in violation of international agreements.