The city is about one hours drive away from Shenzhen and Guangzhou's Baiyun airports. You can catch a train or bus from these cities.
Hong Kong's Mass Transit Railway offers service (the former Kowloon-Canton Railway service) from Hung Hom Station in Hong Kong to Guangzhou with a stop in Dongguan.
There is also a frequent rail shuttle service from Dongguan Station to both Shenzhen and Guangzhou.
The most popular method for Hong Kong locals to travel to Dongguan is by bus. There are several companies that offer bus travel to Dongguan from Hong Kong. A good place to find a bus, would be at the bus stands inside the arrival terminal at Hong Kong Airport. Prices are usually $80-100 for a one-way ticket or $150 for a two-way ticket. Travel times usually range from 1.5hrs to 2.5hrs depending on traffic conditions. If you are traveling from another part of China, you can also travel to Dongguan by bus, most major cities in China will have bus routes to the Dongguan Main Bus Station in NanCheng.
One of the less used ways to get to Dongguan from Hong Kong is by ferry. This allows you to avoid the queues at the busy customs checkpoints on the border between Hong Kong and mainland China.