diff --git src/wp-admin/edit.php src/wp-admin/edit.php
index a05d369e1d..fbf04ac0dd 100644
--- src/wp-admin/edit.php
+++ src/wp-admin/edit.php
@@ -132,6 +132,11 @@ if ( $doaction ) {
 			break;
 		case 'untrash':
 			$untrashed = 0;
+
+			if ( isset( $_GET['doaction'] ) && ( 'undo' === $_GET['doaction'] ) ) {
+				add_filter( 'wp_untrash_post_status', 'wp_untrash_post_set_previous_status', 10, 3 );
+			}
+
 			foreach ( (array) $post_ids as $post_id ) {
 				if ( ! current_user_can( 'delete_post', $post_id ) ) {
 					wp_die( __( 'Sorry, you are not allowed to restore this item from the Trash.' ) );
@@ -144,6 +149,9 @@ if ( $doaction ) {
 				$untrashed++;
 			}
 			$sendback = add_query_arg( 'untrashed', $untrashed, $sendback );
+
+			remove_filter( 'wp_untrash_post_status', 'wp_untrash_post_set_previous_status', 10, 3 );
+
 			break;
 		case 'delete':
 			$deleted = 0;
diff --git src/wp-includes/post.php src/wp-includes/post.php
index 281978eb8d..e62da125d2 100644
--- src/wp-includes/post.php
+++ src/wp-includes/post.php
@@ -2849,7 +2849,24 @@ function wp_untrash_post( $post_id = 0 ) {
 	 */
 	do_action( 'untrash_post', $post_id );
 
-	$post_status = get_post_meta( $post_id, '_wp_trash_meta_status', true );
+	$previous_status = get_post_meta( $post_id, '_wp_trash_meta_status', true );
+
+	/**
+	 * Filter the status that a post gets when it is restored from the trash (untrashed).
+	 *
+	 * By default, posts that are restored will be assigned a status of 'draft'. Return the value of `$previous_status`
+	 * in order to assign the status that the post had before it was trashed. The `wp_untrash_post_set_previous_status()`
+	 * function is available for this.
+	 *
+	 * Prior to WordPress 5.0, restored posts were given their original status.
+	 *
+	 * @since 5.0.0
+	 *
+	 * @param string $new_status      The new status of the post being restored.
+	 * @param int    $post_id         The ID of the post being restored.
+	 * @param string $previous_status The status of the post at the point where it was trashed.
+	 */
+	$post_status = apply_filters( 'wp_untrash_post_status', 'draft', $post_id, $previous_status );
 
 	delete_post_meta( $post_id, '_wp_trash_meta_status' );
 	delete_post_meta( $post_id, '_wp_trash_meta_time' );
@@ -6591,3 +6608,19 @@ function _filter_query_attachment_filenames( $clauses ) {
 
 	return $clauses;
 }
+
+/**
+ * Filter callback which sets the status of an untrashed post to its previous status.
+ *
+ * This can be used as a callback on the `wp_untrash_post_status` filter.
+ *
+ * @since 5.0.0
+ *
+ * @param string $new_status      The new status of the post being restored.
+ * @param int    $post_id         The ID of the post being restored.
+ * @param string $previous_status The status of the post at the point where it was trashed.
+ * @return string The status of the post at the point where it was trashed.
+ */
+function wp_untrash_post_set_previous_status( $new_status, $post_id, $previous_status ) {
+	return $previous_status;
+}
diff --git tests/phpunit/tests/post/wpInsertPost.php tests/phpunit/tests/post/wpInsertPost.php
index d459d9493d..b2d5bc2378 100644
--- tests/phpunit/tests/post/wpInsertPost.php
+++ tests/phpunit/tests/post/wpInsertPost.php
@@ -146,11 +146,51 @@ class Tests_WPInsertPost extends WP_UnitTestCase {
 		);
 
 		wp_untrash_post( $about_page_id );
+		wp_update_post( array(
+			'ID'          => $about_page_id,
+			'post_status' => 'publish',
+		) );
 
 		$this->assertEquals( 'about', get_post( $another_about_page_id )->post_name );
 		$this->assertEquals( 'about-2', get_post( $about_page_id )->post_name );
 	}
 
+	/**
+	 * @ticket 23022
+	 * @dataProvider data_various_post_statuses
+	 */
+	function test_untrashing_a_post_should_always_restore_it_to_draft_status( $post_status ) {
+		$page_id = self::factory()->post->create( array(
+			'post_type'   => 'page',
+			'post_status' => $post_status,
+		) );
+
+		wp_trash_post( $page_id );
+		wp_untrash_post( $page_id );
+
+		$this->assertEquals( 'draft', get_post( $page_id )->post_status );
+	}
+
+	/**
+	 * @ticket 23022
+	 * @dataProvider data_various_post_statuses
+	 */
+	function test_wp_untrash_post_status_filter_restores_post_to_correct_status( $post_status ) {
+		add_filter( 'wp_untrash_post_status', 'wp_untrash_post_set_previous_status', 10, 3 );
+
+		$page_id = self::factory()->post->create( array(
+			'post_type'   => 'page',
+			'post_status' => $post_status,
+		) );
+
+		wp_trash_post( $page_id );
+		wp_untrash_post( $page_id );
+
+		remove_filter( 'wp_untrash_post_status', 'wp_untrash_post_set_previous_status', 10, 3 );
+
+		$this->assertEquals( $post_status, get_post( $page_id )->post_status );
+	}
+
 	/**
 	 * Data for testing the ability for users to set the post slug.
 	 *
@@ -170,6 +210,28 @@ class Tests_WPInsertPost extends WP_UnitTestCase {
 		);
 	}
 
+	/**
+	 * Data for testing post statuses.
+	 *
+	 * @return array Array of test arguments.
+	 */
+	function data_various_post_statuses() {
+		return array(
+			array(
+				'draft',
+			),
+			array(
+				'pending',
+			),
+			array(
+				'private',
+			),
+			array(
+				'publish',
+			),
+		);
+	}
+
 	/**
 	 * Test contributor making changes to the pending post slug.
 	 *
