A biaxially rotatable electrical connector has a base and a rotary part. The rotary part has a rotary member and an insertion member. One end of the rotary member is pivotally connected with the base and is rotated around a first axis, the other end of the rotary member is pivotally connected with the insertion member so that the insertion member can be rotated around a second axis. The base and the rotary part are hollow and their inner spaces communicate with each other. Accordingly, the electrical connector can be flexibly rotated with multiple angular directions and does not conflict with or block other adjacent plug or socket when connected to an electronic device.