you may perform a spectrum analysis or fully transient analysis.
If you have earthquake time history data of acceleration, velocity, or displacement in a separate file, you may create a data table "tab1" using *DIM,tab1,TABLE command, and read from file using the *TREAD command. Then use the D command to apply the load specified in "tab1" and choose AUTOTS,0 and DELTIM compatible with "tab1" and SOLVE as a transient problem in the time domain. If you want to do spectrum analysis instead (as you want to develop the response spectrum), your earthquake data first has to be transformed from time to frequency domain.
Thank you for your answer. Since I just started using ansys, I am having a little problem in understanding your answer. Do you have any tutorial or could you explain to me in step. Thank you