Two Katyusha rockets were fired over the U.S. Embassy residence where Secretary of State George P. Shultz was sleeping early this morning, but they exploded about 100 yards away without causing any injuries or damage to the residence.

Shultz was awakened by the explosions and the roar of the rockets, which U.S. Marine guards said "sounded like a freight train going over." It was not until several hours later that marines found fragments of the Chinese-made rockets indicating that the residence might have been the target of an attack.

The incident occurred less than two weeks after the bombing of the U.S. Embassy in Beirut killed nearly 50 people. That tragedy was an important factor in causing President Reagan to send Shultz to the Middle East in an attempt to work out a Lebanon troop withdrawal agreement.

Speaking to reporters before he flew to Jerusalem this afternoon, Shultz sought to minimize today's incident. Asked if he thought there had been an attempt to kill him, he replied, "No, I don't." And he stressed that he would not be "intimidated" into dropping the shuttle negotiations he has been conducting here and in Jerusalem.

"I didn't hesitate to stay in Beirut last night, and if it is called for by the needs of the situation, I wouldn't hesitate to stay again," he said.

The incident was a dramatic new demonstration of the violence that has become common throughout this country as the result of feuding among Lebanese political and religious factions and the occupation by Israeli, Syrian and Palestine Liberation Organization forces.

Still, as Shultz pointed out, "There is no way of knowing" who fired the rockets or what the purpose had been.

Shultz, who has set up a base in Jerusalem, made the hour-long flight here twice in the last week for talks with Lebanese President Amin Gemayel. On both occasions, he has been whisked from point to point in the city by helicopter and has been surrounded constantly by heavily armed U.S. marines attached to the multinational force here and by Lebanese security forces.

Although the original plans called for him to return to Jerusalem on the same day of each visit to Beirut, his talks with Gemayel yesterday ran late into the evening and he decided to spend the night at the embassy residence in a Beirut suburb.

Among those staying with him in the residence were Reagan's special Middle East envoys, Philip C. Habib and Morris Draper; Nicholas Veliotes, assistant secretary of state for Middle East affairs; and Robert Dillon, the U.S. ambassador here.

The first news of the incident came this morning when State Department spokesman John Hughes told reporters there had been "a lot of bumping and thumping" at the residence during the early morning hours. Initially, Hughes and other U.S. officials said they believed that fighting in the hills outside Beirut between irregular Christian and Moslem Druze forces had caused some mortar or artillery shells to land near the residence.

Later, however, Hughes brought Marine Lt. Alan Burghard, commander of a patrol that investigated the incident, to talk with reporters. Burghard, an artillery officer, said his men had found two 122 mm Katyusha rockets that had exploded on a slope roughly 100 yards behind the residence.

"The ambassador's residence was in the direct flight path, and so I assume it was the target," the lieutenant said.