diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
index ca4b3d03fdb..8572c98c483 100644
--- a/src/wp-includes/user.php
+++ b/src/wp-includes/user.php
@@ -2112,10 +2112,16 @@ function wp_insert_user( $userdata ) {
 		return new WP_Error( 'user_login_too_long', __( 'Username may not be longer than 60 characters.' ) );
 	}
 
+	// Username must be unique.
 	if ( ! $update && username_exists( $user_login ) ) {
 		return new WP_Error( 'existing_user_login', __( 'Sorry, that username already exists!' ) );
 	}
 
+	// Username must not exist as an existing email.
+	if ( email_exists( $user_login ) ) {
+		return new WP_Error( 'existing_user_login_as_email', 'Sorry, that username is not available.');
+	}
+
 	/**
 	 * Filters the list of disallowed usernames.
 	 *
@@ -3329,7 +3335,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() );
