public void unregisterMBean(ObjectName objectName) {
    try {
      if (!isRegistered(objectName)) {
        return;
      }

      mbeanServer.unregisterMBean(objectName);

      // For Local GemFire MBeans
      if (localGemFireMBean.get(objectName) != null) {
        localGemFireMBean.remove(objectName);
      }
    } catch (InstanceNotFoundException instanceNotFoundException) {
      // An InstanceNotFoundException in this context means that the MBean
      // has already been unregistered, so just log a debug message as it is
      // essentially a no-op.
      // has already been unregistered, so just log a warning message.
      logRegistrationWarning(objectName, false);
    } catch (NullPointerException | MBeanRegistrationException e) {
      throw new ManagementException(e);
    }
  }
This method will unregister the MBean from GemFire Domain
geode-core/src/main/java/org/apache/geode/management/internal/MBeanJMXAdapter.java