diff --git a/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php b/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php
index e61f25e..2559884 100644
--- a/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php
+++ b/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php
@@ -3,13 +3,17 @@
 namespace Drupal\content_moderation\Plugin\WorkflowType;
 
 use Drupal\Core\Access\AccessResult;
+use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\Core\StringTranslation\StringTranslationTrait;
 use Drupal\content_moderation\ContentModerationState;
 use Drupal\workflows\Plugin\WorkflowTypeBase;
 use Drupal\workflows\StateInterface;
 use Drupal\workflows\WorkflowInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * Attaches workflows to content entity types and their bundles.
@@ -19,11 +23,38 @@
  *   label = @Translation("Content moderation"),
  * )
  */
-class ContentModeration extends WorkflowTypeBase {
+class ContentModeration extends WorkflowTypeBase implements ContainerFactoryPluginInterface {
 
   use StringTranslationTrait;
 
   /**
+   * The entity type manager.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface
+   */
+  protected $entityTypeManager;
+
+  /**
+   * Creates an instance of the ContentModeration WorkflowType plugin.
+   */
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition);
+    $this->entityTypeManager = $entity_type_manager;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
+    return new static(
+      $configuration,
+      $plugin_id,
+      $plugin_definition,
+      $container->get('entity_type.manager')
+    );
+  }
+
+  /**
    * {@inheritdoc}
    */
   public function checkWorkflowAccess(WorkflowInterface $entity, $operation, AccountInterface $account) {
@@ -88,10 +119,11 @@ public function getEntityTypes() {
    *   The entity type ID to get the bundles for.
    *
    * @return string[]
-   *   The bundles of the entity type the workflow is applied to.
+   *   The bundles of the entity type the workflow is applied to or an empty
+   *   array if the entity type is not applied to the workflow.
    */
   public function getBundlesForEntityType($entity_type_id) {
-    return $this->configuration['entity_types'][$entity_type_id];
+    return isset($this->configuration['entity_types'][$entity_type_id]) ? $this->configuration['entity_types'][$entity_type_id] : [];
   }
 
   /**
@@ -156,11 +188,59 @@ public function defaultConfiguration() {
   }
 
   /**
-   * @inheritDoc
+   * {@inheritdoc}
    */
   public function calculateDependencies() {
-    // @todo : Implement calculateDependencies() method.
-    return [];
+    $dependencies = parent::calculateDependencies();
+    foreach ($this->getEntityTypes() as $entity_type_id) {
+      $entity_definition = $this->entityTypeManager->getDefinition($entity_type_id);
+      foreach ($this->getBundlesForEntityType($entity_type_id) as $bundle) {
+        $dependency = $entity_definition->getBundleConfigDependency($bundle);
+        $dependencies[$dependency['type']][] = $dependency['name'];
+      }
+    }
+    return $dependencies;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function onDependencyRemoval(array $dependencies) {
+    $changed = parent::onDependencyRemoval($dependencies);
+
+    // When bundle config entities are removed, ensure they are cleaned up from
+    // the workflow.
+    foreach ($dependencies['config'] as $removed_config) {
+      if ($entity_type_id = $removed_config->getEntityType()->getBundleOf()) {
+        $bundle_id = $removed_config->id();
+        $this->removeEntityTypeAndBundle($entity_type_id, $bundle_id);
+        $changed = TRUE;
+      }
+    }
+
+    // When modules that provide entity types are removed, ensure they are also
+    // removed from the workflow.
+    if (!empty($dependencies['module'])) {
+      // Gather all entity definitions provided by the dependent modules which
+      // are being removed.
+      $module_entity_definitions = [];
+      foreach ($this->entityTypeManager->getDefinitions() as $entity_definition) {
+        if (in_array($entity_definition->getProvider(), $dependencies['module'])) {
+          $module_entity_definitions[] = $entity_definition;
+        }
+      }
+
+      // For all entity types provided by the uninstalled modules, remove any
+      // configuration for those types.
+      foreach ($module_entity_definitions as $module_entity_definition) {
+        foreach ($this->getBundlesForEntityType($module_entity_definition->id()) as $bundle) {
+          $this->removeEntityTypeAndBundle($module_entity_definition->id(), $bundle);
+          $changed = TRUE;
+        }
+      }
+    }
+
+    return $changed;
   }
 
 }
diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php
index 69bb580..a3f99d3 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php
@@ -382,6 +382,48 @@ protected function setEntityTestWithBundleKeys($keys, $remove_keys = []) {
   }
 
   /**
+   * Tests the dependencies of the workflow when using content moderation.
+   */
+  public function testWorkflowDependencies() {
+    $node_type = NodeType::create([
+      'type' => 'example',
+    ]);
+    $node_type->save();
+
+    $workflow = Workflow::load('editorial');
+    // Test both a config and non-config based bundle and entity type.
+    $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'example');
+    $workflow->getTypePlugin()->addEntityTypeAndBundle('entity_test_rev', 'entity_test_rev');
+    $workflow->save();
+
+    $this->assertEquals([
+      'module' => [
+        'content_moderation',
+        'entity_test',
+      ],
+      'config' => [
+        'node.type.example',
+      ],
+    ], $workflow->getDependencies());
+
+    $entity_types = $workflow->getTypePlugin()->getEntityTypes();
+    $this->assertTrue(in_array('node', $entity_types));
+    $this->assertTrue(in_array('entity_test_rev', $entity_types));
+
+    // Delete the node type and ensure it is removed from the workflow.
+    $node_type->delete();
+    $workflow = Workflow::load('editorial');
+    $entity_types = $workflow->getTypePlugin()->getEntityTypes();
+    $this->assertFalse(in_array('node', $entity_types));
+
+    // Uninstall entity test and ensure it's removed from the workflow.
+    $this->container->get('config.manager')->uninstall('module', 'entity_test');
+    $workflow = Workflow::load('editorial');
+    $entity_types = $workflow->getTypePlugin()->getEntityTypes();
+    $this->assertFalse(in_array('entity_test_rev', $entity_types));
+  }
+
+  /**
    * Reloads the entity after clearing the static cache.
    *
    * @param \Drupal\Core\Entity\EntityInterface $entity
diff --git a/core/modules/workflows/src/Entity/Workflow.php b/core/modules/workflows/src/Entity/Workflow.php
index 3bf8d22..f3b76ac 100644
--- a/core/modules/workflows/src/Entity/Workflow.php
+++ b/core/modules/workflows/src/Entity/Workflow.php
@@ -503,4 +503,13 @@ public function status() {
     return !empty($this->status) && !empty($this->states);
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function onDependencyRemoval(array $dependencies) {
+    $changed = $this->getTypePlugin()->onDependencyRemoval($dependencies);
+    // Call parent first to ensure it is always called regardless of $changed.
+    return parent::onDependencyRemoval($dependencies) || $changed;
+  }
+
 }
diff --git a/core/modules/workflows/src/Plugin/WorkflowTypeBase.php b/core/modules/workflows/src/Plugin/WorkflowTypeBase.php
index 1ed9fca..23ab318 100644
--- a/core/modules/workflows/src/Plugin/WorkflowTypeBase.php
+++ b/core/modules/workflows/src/Plugin/WorkflowTypeBase.php
@@ -124,4 +124,11 @@ public function calculateDependencies() {
     return [];
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function onDependencyRemoval(array $dependencies) {
+    return FALSE;
+  }
+
 }
diff --git a/core/modules/workflows/src/WorkflowTypeInterface.php b/core/modules/workflows/src/WorkflowTypeInterface.php
index 17fddec..aa04aea 100644
--- a/core/modules/workflows/src/WorkflowTypeInterface.php
+++ b/core/modules/workflows/src/WorkflowTypeInterface.php
@@ -117,4 +117,17 @@ public function buildStateConfigurationForm(FormStateInterface $form_state, Work
    */
   public function buildTransitionConfigurationForm(FormStateInterface $form_state, WorkflowInterface $workflow, TransitionInterface $transition = NULL);
 
+  /**
+   * Informs the plugin that a dependency of the workflow will be deleted.
+   *
+   * @param array $dependencies
+   *   An array of dependencies that will be deleted keyed by dependency type.
+   *
+   * @return bool
+   *   TRUE if the workflow settings have been changed, FALSE if not.
+   *
+   * @see \Drupal\Core\Config\ConfigEntityInterface::onDependencyRemoval()
+   */
+  public function onDependencyRemoval(array $dependencies);
+
 }
