This paper studies joint source and relay beamforming optimization and time allocation for a wireless powered multi-relay multi-user network, where a multi-antenna base station (BS) transmits information to users with the assistance of multiple single-antenna relays. Considering that the relays are energy-constrained, which are powered by the BS wirelessly, we aim to maximize the minimum rate among the users by jointly optimizing the information and energy beamforming at the BS, the distributed beamforming at the relays, and the time allocation under the power constraints and the energy causality constraints at the BS and relays, respectively. In order to tackle the formulated optimization problem, we propose an iterative algorithm by alternatively solving two subproblems. Numerical results show that the proposed joint optimization scheme obviously outperforms other schemes.