Convert each new line in the textfield as a new value in an array

To do so, you will want to use the explode() function to break up each new line (\n) into another array value. Also it is important to replace the invisible Carriage Return which is also used as a new line character by Mac OS:

# Get the plugin options
$settings = get_option( 'myplugin_menu' );
if ( isset( $settings['main_menu'] ) ) {
    # Convert each new line in the textarea as an array item
    $menu_slug = explode( "\n", str_replace( "\r", "", $settings['main_menu'] ) );
    foreach ( $menu_slug as $key => $value ) {
        # Remove each menu item
        remove_menu_page( $value );
    }
}