Dung beetles can perform impressive multiple motor behaviors using their legs. The behaviors include walking and rolling a large dung ball on different terrains, e.g., level ground and different slopes. To achieve such complex behaviors for legged robots, we propose here a modular neural controller for dung beetle-like locomotion and object transportation behaviors of a dung beetle-like robot. The modular controller consists of several modules based on three generic neural modules. The main modules include 1) a neural oscillator network module (as a central pattern generator (CPG)), 2) a neural CPG postprocessing module (PCPG), 3) a velocity regulating network module (VRN). The CPG generates basic rhythmic patterns. The patterns are first shaped by the PCPG and their amplitudes as well as phases are later modified by the VRN to obtain proper motor patterns for locomotion and object transportation. Combining all these neural modules, we can achieve different motor patterns for four different actions which are forward walking, backward walking, level-ground ball rolling, and sloped-ground ball rolling. All these actions can be activated by four input neurons. The experimental results show that the simulated dung beetle-like robot can robustly perform the actions. The average forward speed is 0.058 cm/s and the robot is able to roll a large ball (about 3 times of its body height and 2 times of its weight) up different slope angles up to 25 degrees.