The ship was laid down as Riga at Shipyard 444 (now Nikolayev South) in Mykolaiv, Ukraine, on December 6, 1985. Design work was undertaken by the Nevskoye Planning and Design Bureau. Launched on December 4, 1988, the carrier was renamed Varyag in late 1990, after the famous cruiser. Often referred to as an aircraft carrier, the vessel's design implied a mission different from carriers of the United States Navy, Royal Navy or French Navy. The Russian term used by her builders to describe the ships is tyazholiy avianesushchiy kreyser (TAKR or TAVKR) "heavy aircraft-carrying cruiser", intended to support strategic missile-carrying submarines, surface ships, and maritime missile-carrying aircraft of the Russian fleet. The Soviet Union and later Russia argued that the ships are not aircraft carriers under the Montreux Convention and not subject to the tonnage limits imposed on these ships in traveling through the Bosphorus.
Construction ceased by 1992, with the ship structurally complete but without electronics. With the dissolution of the Soviet Union, ownership was transferred to Ukraine; the ship was laid up, unmaintained. Ukraine immediately began searching for possible customers, and made overtures to China, which sent a high-level expert delegation in 1992. Although the delegation made a positive report on the condition of the ship, recommending a purchase, the Beijing leadership declined because of the international diplomatic situation at the time. Nevertheless, the People's Liberation Army Navy (PLAN, the Chinese navy) did not lose interest, and four years later took an independent initiative under cover of a commercial purchase.
In April 1998, Ukrainian Trade Minister Roman Shpek announced the winning bid of US$20 million from Chong Lot Travel Agency, a Hong Kong-based company, which proposed to tow Varyag out of the Black Sea, through the Suez Canal and around southern Asia to Macau, where the ship would be moored and converted into a floating hotel and casino, similar to the Kiev in Tianjin and Minsk at Minsk World in Shenzhen. Before the auction was closed, officials in Macau had warned Chong Lot that it would not be permitted to berth Varyag in the harbor. Chong Lot is owned by Chin Luck (Holdings) Company of Hong Kong; four of Chin Luck's six board members live in Yantai, China, the location of a major navy shipyard; the chairman Xu Zengping is a former career military officer and captain of a basketball team with the People's Liberation Army. The sale of the carrier was successfully closed in 1998.
In January 2015, further details of the transaction emerged from an interview with Xu Zengping by the South China Morning Post. Xu reported that he was commissioned by the PLAN to purchase the vessel on its behalf, with the floating hotel and casino as a cover story to avoid offending the U.S. and to placate Ukrainian concerns about potential military use. He was warned that there was significant risk from the lack of both a navy budget and support of Beijing for the purchase. Nevertheless, in 1998 Xu was so impressed when he boarded the ship in Mykolaiv, that he resolved to purchase it using his personal funds despite the risks. The previous year, Xu had already spent HK$6 million creating a Macau shell company, Agencia Turistica e Diversoes Chong Lot, having borrowed HK$230 million from a Hong Kong business friend. He described a harrowing negotiation in Kiev, lubricated by bribery and liquor, which helped to arrange victory at the auction. As a precaution, the next day he shipped the 40 tonnes of blueprints for the carrier overland to China in eight trucks. There also was a charge of US$10 million for late payment due to difficulties raising the funds during the Asian financial crisis.