diff --git a/core/modules/taxonomy/src/Entity/Term.php b/core/modules/taxonomy/src/Entity/Term.php
index 6032861..82dc560 100644
--- a/core/modules/taxonomy/src/Entity/Term.php
+++ b/core/modules/taxonomy/src/Entity/Term.php
@@ -78,6 +78,9 @@ public static function postDelete(EntityStorageInterface $storage, array $entiti
     // deleting them so that their children/parent information is consistent.
     $storage->deleteTermHierarchy(array_keys($entities));
 
+    // Unparent the terms.
+    $storage->unparentTerms(array_keys($entities));
+
     if (!empty($orphans)) {
       entity_delete_multiple('taxonomy_term', $orphans);
     }
diff --git a/core/modules/taxonomy/src/TermStorage.php b/core/modules/taxonomy/src/TermStorage.php
index 381b0ab..7923807 100644
--- a/core/modules/taxonomy/src/TermStorage.php
+++ b/core/modules/taxonomy/src/TermStorage.php
@@ -66,6 +66,15 @@ public function deleteTermHierarchy($tids) {
       ->condition('tid', $tids)
       ->execute();
   }
+  /**
+   * @param array $tids
+   *   Removes reference to parents from term_hierarchy.
+   */
+  public function unparentTerms($tids) {
+    $this->database->delete('taxonomy_term_hierarchy')
+      ->condition('parent', $tids)
+      ->execute();
+  }
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/taxonomy/src/TermStorageInterface.php b/core/modules/taxonomy/src/TermStorageInterface.php
index 634ff3d..b2cab70 100644
--- a/core/modules/taxonomy/src/TermStorageInterface.php
+++ b/core/modules/taxonomy/src/TermStorageInterface.php
@@ -16,7 +16,7 @@
 interface TermStorageInterface extends EntityStorageInterface {
 
   /**
-   * Removed reference to terms from term_hierarchy.
+   * Removes reference to terms from term_hierarchy.
    *
    * @param array $tids
    *   Array of terms that need to be removed from hierarchy.
