With topologcial semimetal developing, semimetal with nodal-line ring comes into peoples vision as a powerful candidate for practical application of topological devices. We propose a method using ultracold atoms in two-dimensional amplitude-shaken bipartite hexagonal optical lattice to simulate nodal-line semimetal, which can be achieved in experiment by attaching one triangular optical lattice to a hexangonal optical lattice and periodically modulating the intensity and position of the triangular lattice. By amplitude shaking, a time-reversal-symmetry-unstable mode is introduced into the bipartite optical lattice, and then the nodal-line semimetal is gotten by adjusting the proportion of such mode and the trivial mode of hexagonal lattice. Through calculating the energy spectrum of effective Hamiltonian, the transformation from Dirac semimetal to nodal-line semimetal in pace with changing shaking parameters is observed. We also study the change of Berry curvature and Berry phase in the transformation, which provides guidance on measuring the transformation in experiment. By analyzing the symmetry of the system, the emergence of the time-reversal-symmetry-unstable mode is researched. This proposal provides a way to research the pure nodal-line semimetal without the influence of other bands, which may contribute to the study of those unique features of surface states and bulk states of nodal-line semimetal.