I know it is not uncommon to be promoted after death, but has the opposite ever occurred?
To answer this question, you have to understand the nature of retirement in the US military. Officers never leave the US military. Active duty commissioned officers are simply moved to the "inactive" list when they "retire." They still hold their rank and commission until they die. Reserve officers do not hold their rank upon retirement and are not subject to military justice.
A lot of officers have been demoted while on active duty. A few examples include:
-Brigadier General Janis Karpinski demoted to Colonel due to her role in the Abu Ghraib prisoner abuse scandal
-Lieutenant General Walter Short demoted to Major General after failing to protect Pearl Harbor on December 7, 1941.
An officer is usually demoted immediately for conduct while on active duty and, if the offense is bad enough, is forced into early retirement. I could not find any record of an officer being demoted after retiring. If they are to be demoted, they are usually demoted upon retirement (as was the case with General William E. Ward who was demoted to Lieutenant General when he retired in 2012) because, like I outline above, they keep their rank upon being deactivated.