Human brain organoids, 3D brain tissue cultures derived from human pluripotent stem cells, hold promising potential in modeling neuroinflammation for a variety of neurological diseases. However, challenges remain in generating standardized human brain organoids that can recapitulate key physiological features of a human brain. Here, we present tubular organoid-on-a-chip devices to generate better organoids and model neuroinflammation. By employing 3D printed hollow mesh scaffolds, our device can be easily incorporated into multiwell-plates for reliable, scalable, and reproducible generation of tubular organoids. By introducing rocking flows through the tubular device channel, our device can perfuse nutrients and oxygen to minimize organoid necrosis and hypoxia, and incorporate immune cells into organoids to model neuro-immune interactions. Compared with conventional protocols, our method increased neural progenitor proliferation and reduced heterogeneity of human brain organoids. As a proof-of-concept application, we applied this method to model the microglia-mediated neuroinflammation after exposure to an opioid receptor agonist. We found isogenic microglia were activated after exposure to an opioid receptor agonist (DAMGO) and transformed back to the homeostatic status with further treatment by a cannabinoid receptor 2 (CB2) agonist (LY2828360). Importantly, the activated microglia in tubular organoids had stronger cytokine responses compared to those in 2D microglial cultures. Our tubular organoid device is simple, versatile, inexpensive, easy-to-use, and compatible with multiwell-plates, so it can be widely used in common research and clinical laboratory settings. This technology can be broadly used for basic and translational applications in inflammatory diseases including substance use disorders, neural diseases, autoimmune disorders, and infectious diseases.