This article concentrates on the problem of walking pattern generation and online control for humanoid robot. However, it is challenging and thus still remains open so far in the field of bipedal locomotion control. In this article, we solve this problem by proposing a bivariate-stability-margin-based control scheme, in which a random vector functionlink neural networks mechanism is additionally contained. By utilizing opposition-based learning algorithm to generate walking patterns and designing random vector function-link neural networks for compensating the combination of zeromoment point error and modeling error, the new walking controller exhibits good performance. Moreover, a bivariatestability-margin-based fuzzy logic system is proposed to assign a weight to each training sample according to locomotion stability. With these results, a walking control system is successfully established and experiments validate the proposed control scheme.