Question: how to publish mxd to arcgis online?
Answer: Open your map document in ArcMap and choose File > Share As > Service from the main menu. ... 
Choose Publish a service and click Next.
Choose the ArcGIS Server connection you want to use from the Choose a connection drop-down list. ... 
Optionally, in the Publish a Service window, enter a new name for the service.