diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
index 8e230708e4..5e9195ed9d 100644
--- a/src/wp-includes/user.php
+++ b/src/wp-includes/user.php
@@ -2124,8 +2124,18 @@ function wp_insert_user( $userdata ) {
 		return new WP_Error( 'user_login_too_long', __( 'Username may not be longer than 60 characters.' ) );
 	}
 
-	if ( ! $update && username_exists( $user_login ) ) {
-		return new WP_Error( 'existing_user_login', __( 'Sorry, that username already exists!' ) );
+	// Check additional restrictions for new users.
+	if ( ! $update ) {
+
+		// Username must be unique.
+		if ( username_exists( $user_login ) ) {
+			return new WP_Error( 'existing_user_login', __( 'Sorry, that username already exists!' ) );
+		}
+
+		// Username must not match an existing user email.
+		if ( email_exists( $user_login ) ) {
+			return new WP_Error( 'existing_user_email_as_login', __( 'Sorry, that username is not available.' ) );
+		}
 	}
 
 	/**
@@ -3354,6 +3364,8 @@ function register_new_user( $user_login, $user_email ) {
 		$sanitized_user_login = '';
 	} elseif ( username_exists( $sanitized_user_login ) ) {
 		$errors->add( 'username_exists', __( '<strong>Error:</strong> This username is already registered. Please choose another one.' ) );
+	} elseif ( email_exists( $sanitized_user_login ) ) {
+		$errors->add( 'username_exists_as_email', __( '<strong>Error:</strong> This username is not available. Please choose another one.' ) );
 	} else {
 		/** This filter is documented in wp-includes/user.php */
 		$illegal_user_logins = (array) apply_filters( 'illegal_user_logins', array() );
diff --git a/tests/phpunit/tests/user.php b/tests/phpunit/tests/user.php
index 7157a00cfa..7d47acebc2 100644
--- a/tests/phpunit/tests/user.php
+++ b/tests/phpunit/tests/user.php
@@ -915,6 +915,66 @@ class Tests_User extends WP_UnitTestCase {
 		$this->assertSame( 'user_nicename_too_long', $u->get_error_code() );
 	}
 
+
+	/**
+	 * Tests that `wp_insert_user()` rejects a 'user_login' that matches an existing user email.
+	 *
+	 * @ticket 57394
+	 *
+	 * @covers ::wp_insert_user
+	 */
+	public function test_wp_insert_user_should_reject_user_login_that_matches_existing_user_email() {
+		$existing_email = get_option( 'admin_email' );
+		$user_id        = wp_insert_user(
+			array(
+				'user_login'    => $existing_email,
+				'user_email'    => 'whatever@example.com',
+				'user_pass'     => 'whatever',
+				'user_nicename' => 'whatever',
+			)
+		);
+
+		$this->assertWPError( $user_id, 'An error should have been returned as the user_login matches an existing email.' );
+		$this->assertSame( 'existing_user_email_as_login', $user_id->get_error_code(), 'An incorrect error code was returned.' );
+	}
+
+	/**
+	 * Tests that `wp_update_user()` does not reject a 'user_login' that matches an existing user email.
+	 *
+	 * @ticket 57394
+	 *
+	 * @covers ::wp_update_user
+	 */
+	public function test_wp_update_user_should_not_reject_user_login_that_matches_existing_user_email() {
+		$new_email = 'new.email@example.com';
+		$user_id   = wp_insert_user(
+			array(
+				'user_login'    => $new_email,
+				'user_email'    => $new_email,
+				'user_pass'     => 'whatever',
+				'user_nicename' => 'whatever',
+			)
+		);
+
+		$this->assertNotWPError( $user_id, 'The test user could not be created.' );
+
+		$user_id = wp_update_user(
+			array(
+				'ID'            => $user_id,
+				'user_login'    => $new_email,
+				'user_email'    => $new_email,
+				'user_nicename' => 'new-nicename',
+			)
+		);
+
+		$this->assertNotWPError( $user_id, 'An error should not have been returned.' );
+		$this->assertSame(
+			'new-nicename',
+			get_userdata( $user_id )->user_nicename,
+			'The user_nicename should have been updated.'
+		);
+	}
+
 	/**
 	 * @ticket 33793
 	 */
