Museveni went ahead to promote Gen Muhoozi from Lieutenant-General in charge of Uganda's Defence Land Force to a general, one rank below his as commander-in-chief.
"Why, then, promote him to full General after these comments? This is because this mistake is one aspect where he has acted negatively as a public officer," said Museveni in his letter.
Museveni apologised to Kenyans and Ugandans who he said "could have been annoyed by one of their officials meddling in the affairs of brother Kenya. I know for a fact that Gen Muhoozi is a passionate Pan-Africanist."
He said the only available legitimate forum to use, as per Gen Mohoozi's tweets, was the "peer review mechanism of the African Union or confidential interactions among us or EAC and AU fora and not public comments."
The Ugandan president praised his son and explained that he promoted him using a time-tested formula - "to discourage the negative and encourage the positive given that General Muhoozi had many other positive contributions the General has made and can still make."
He congratulated President William Ruto for winning the election and Kenyans for holding peaceful elections.
Earlier on Tuesday, the Ministry of Foreign Affairs of Uganda had distanced itself from Gen Muhoozi's comments, saying "the government and the people of the Republic of Uganda treasure the existing strong bilateral relations between the people and the Government of the Republic of Kenya based on our shared history, common values, mutual respect, trust and the desire to build a unified East African Community."