More than 150 D.C. housing department employes got the day off yesterday after the city's fire marshal ruled it was unsafe for the department to start occupying its new headquarters in Northeast Washington.

Although the building, a converted warehouse at 21 M St., is still undergoing a $3.5 million renovation, the first contingent of department employes was scheduled to begin working there yesterday. Instead, when office workers arrived yesterday morning, all but about 30 supervisors and employes of the director's office were barred from the building by housing officials and sent home.

Late yesterday afternoon, after a fire inspector made his fourth inspection in as many working days and found various deficiencies corrected, fire officials approved the building.

"We can't let people occupy the building until it is safe," explained Fire Marshal Hugh Clarke. He said he had denied the housing department permission on Friday and again yesterday morning to occupy the building after inspectors found scaffolding blocking its two exits, red exit signs pointing the wrong way and open elevator shafts acting, in effect, as flues that would carry a fire swiftly up and through the building.

"I just refused to sign off until these deficiencies were corrected," said Clarke, who visited the new office building yesterday morning and sent an inspector, out for a second inspection in the afternoon. The housing department immediately since most of the files and furniture for about 200 employes were moved in over the weekend. By the end of March, an estimated 500 employes will occupy the building.

Deputy housing director James E. Clay, who supervised the renovation, said employes were told to report to the building yesterday morning because "we thought we would have the certificate of occupancy. We're not interested in breaking the law. It was never our intent to occupy the building without a certificate of occupancy."

Before any new or renovated building can be occupied in the District, it must be issued a certificate of occupancy indicating it has met the requirements of the city's building, plumbing, electrical and fire codes.

Housing director Robert L. Moore decided to move the housing department's main offices out of its rented office space at 1325 G St. NW after the rent doubled in 1979. He said he also wanted to consolidate much of his fragmented department of 1,200 employes, who have been scattered in six locations around the city.

Housing officials devised an unusual and complicated arrangement to obtain the new office space by using part of the city's community development grant funds, which are traditionally spent to repair public housing, make loans to low- and moderate income tenants to purchase their apartment buildings to avoid displacement and help poorer families buy their first home. The money will be repaid after March 31, when the building is scheduled to be completed, department officials said.

By using the grant funds, which come from the federal government, the department avoided the lengthy process of obtaining an appropriation through the City Council and Congress.

The new office building is located just off North Capitol Street in the midst of a dreary warehouse area devoid of stores and restaurants, much to the chagrin of many employes. The building's cafeteria is unfinished and elevators have not been installed.