This study aimed to explore companion planting to improve vegetable productivity on extensive green roofs through urban agriculture with limited substrate depth. From May to July 2021, the study conducted on the rooftop to evaluate the effects of marigold (Tagetes patula) planting ratio on the growth and pest control of cabbage (Brassica campestris). The experiment plot measured 1 m in width × 1 m in length × 0.25 m in height and 0.2 m in substrate depth. Fifteen plots were planted in varying proportions of cabbage and marigold for three repetitions per treatment: cabbage control (CC), 2:1(C2M1), 1:1(C1M1), 1:2(C1M2), and marigold control (MC). We found that companion planting marigolds with cabbage significantly increased cabbage growth and reduced pest infestation. The study revealed that C1M1, when cabbage and marigold have the same proportion, is an efficient companion planting ratio. Companion planting, in which non-crop vegetation manages pests and increases crop productivity, improves natural pest control and preserves biodiversity on rooftop urban agriculture.