diff --git a/core/modules/taxonomy/src/Entity/Term.php b/core/modules/taxonomy/src/Entity/Term.php
index 5b0072b..966de67 100644
--- a/core/modules/taxonomy/src/Entity/Term.php
+++ b/core/modules/taxonomy/src/Entity/Term.php
@@ -60,9 +60,10 @@ class Term extends ContentEntityBase implements TermInterface {
   public static function postDelete(EntityStorageInterface $storage, array $entities) {
     parent::postDelete($storage, $entities);
 
+    $tids = array_keys($entities);
     // See if any of the term's children are about to be become orphans.
     $orphans = array();
-    foreach (array_keys($entities) as $tid) {
+    foreach ($tids as $tid) {
       if ($children = $storage->loadChildren($tid)) {
         foreach ($children as $child) {
           // If the term has multiple parents, we don't delete it.
@@ -76,7 +77,7 @@ public static function postDelete(EntityStorageInterface $storage, array $entiti
 
     // Delete term hierarchy information after looking up orphans but before
     // deleting them so that their children/parent information is consistent.
-    $storage->deleteTermHierarchy(array_keys($entities));
+    $storage->deleteTermHierarchy($tids);
 
     if (!empty($orphans)) {
       $storage->delete($orphans);
@@ -92,7 +93,6 @@ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
     // Only change the parents if a value is set, keep the existing values if
     // not.
     if (isset($this->parent->target_id)) {
-      $storage->deleteTermHierarchy(array($this->id()));
       $storage->updateTermHierarchy($this);
     }
   }
diff --git a/core/modules/taxonomy/src/TermStorage.php b/core/modules/taxonomy/src/TermStorage.php
index bc44c22..4566678 100644
--- a/core/modules/taxonomy/src/TermStorage.php
+++ b/core/modules/taxonomy/src/TermStorage.php
@@ -95,7 +95,10 @@ public function resetCache(array $ids = NULL) {
    */
   public function deleteTermHierarchy($tids) {
     $this->database->delete('taxonomy_term_hierarchy')
-      ->condition('tid', $tids, 'IN')
+      ->condition(db_or()
+        ->condition('tid', $tids, 'IN')
+        ->condition('parent', $tids, 'IN')
+      )
       ->execute();
   }
 
@@ -103,6 +106,10 @@ public function deleteTermHierarchy($tids) {
    * {@inheritdoc}
    */
   public function updateTermHierarchy(EntityInterface $term) {
+    // Remove the term from taxonomy_term_hierarchy before repopulating.
+    $this->database->delete('taxonomy_term_hierarchy')
+      ->condition('tid', $term->id())
+      ->execute();
     $query = $this->database->insert('taxonomy_term_hierarchy')
       ->fields(array('tid', 'parent'));
 
diff --git a/core/modules/taxonomy/src/TermStorageInterface.php b/core/modules/taxonomy/src/TermStorageInterface.php
index 9916711..dd45d10 100644
--- a/core/modules/taxonomy/src/TermStorageInterface.php
+++ b/core/modules/taxonomy/src/TermStorageInterface.php
@@ -11,7 +11,7 @@
 interface TermStorageInterface extends ContentEntityStorageInterface {
 
   /**
-   * 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.
diff --git a/core/modules/taxonomy/src/Tests/TermTest.php b/core/modules/taxonomy/src/Tests/TermTest.php
index 311ed6b..1627c78 100644
--- a/core/modules/taxonomy/src/Tests/TermTest.php
+++ b/core/modules/taxonomy/src/Tests/TermTest.php
@@ -111,6 +111,21 @@ function testTaxonomyTermHierarchy() {
     $term2->save();
     $parents = $taxonomy_storage->loadParents($term2->id());
     $this->assertTrue(isset($parents[$term1->id()]) && isset($parents[$term3->id()]), 'Both parents found successfully.');
+
+    // Delete term 3 from the term edit page.
+    $this->drupalGet('taxonomy/term/' . $term3->id() . '/edit');
+    $this->clickLink(t('Delete'));
+    $this->drupalPostForm(NULL, NULL, t('Delete'));
+
+    // Check the hierarchy after deletion one parent of multiple parents.
+    $taxonomy_storage->resetCache();
+    $parents = $taxonomy_storage->loadTree($this->vocabulary->id(), $term3->id());
+    $this->assertTrue(count($parents) == 0, 'Term 3 has no lineage.');
+
+    // Check the existing parent in the hierarchy after deletion.
+    $taxonomy_storage->resetCache();
+    $parents = $taxonomy_storage->loadParents($term2->id());
+    $this->assertTrue(isset($parents[$term1->id()]) && count($parents) == 1, 'Existing parent found successfully.');
   }
 
   /**
