Leonel J. Castillo expects to resign within the next 30 days, close friends of the controversial commissioner of the U.S. Immigration and Naturalization Service said yesterday.

The former comptroller of the city of Houston, recruited by President Carter to head one of the most tangled and troubled bureaucracies in the federal government, has acknowledged that he is con sidering "several opportunities . . . in both business and politics," but said in an official statement released by his office that he has not made a definite decision.

When pressed about suggestions that he has already dicided to resign by aug. 15, Castillo, in a telephone interview, said that he would not add anything to his original statement.

Terry Adamson, special assistant to Attorney General Griffin Bell, said by telephone that Castillo discussed leaving the immigration post with the attorney general last week. Bell, he said, is waitina final decision from Castillo before he takes the next step in the process.

"We would like him to stay, and we are pleased with the progress in one of the most neglected agencies in government," Adamson said. "Mr. Castillo has made substantial contributions, but we won't stand in his way if he wishes to pursue what appears to be some pretty good personal opportunities."

Adamson said that a change in the commissioner's chair probably would have little impact on the ongoing operations of the agency because major policy changes probably will await the findings of the federal Select Commission on Immigration and Refugee Policy, chaired by Reuben Askew, former governor of florida. Those findings are due in 1981.