An end cap of a lighting tube includes a first assembly member and a second assembly member. The first assembly member includes a first shell, several recesses, and two first position-limiting elements. The first shell has a first central-securing element, and the first shell forms a first area and a second area. The two first position-limiting elements are disposed on the first area. The second assembly member includes a second shell, a first elastic element, a second elastic element, and two positioning elements. An end of the second shell is connected to a lighting tube and a second central-securing element of the second shell is secured with the first central-securing element. The first elastic element is disposed on the second shell. The second elastic element is disposed on the second shell. The two positioning elements are disposed on the second shell.