Manual:$wgRemoveGroups

Details
If a group can remove any right (example: bureaucrats can remove any right):

If a group remove only some rights (example: bureaucrats can remove only sysop and bot groups):

User must have access to Special:Userrights. If $wgAddGroups and $wgRemoveGroups aren't set for a specific group, then this group can add and remove any group.