Read Nehemiah 6-7 at Bible Gateway.
“For they all were trying to make us afraid, saying, “Their hands will be weakened in the work, and it will not be done.” Now therefore, O God, strengthen my hands.” Neh 6:9
“For this reason he was hired, that I should be afraid and act that way and sin, so that they might have cause for an evil report, that they might reproach me. My God, remember Tobiah and Sanballat, according to these their works, and the prophetess Noadiah and the rest of the prophets who would have made me afraid.” Neh 6:13-14
Nehemiah knew that fear, of going forward in obedience to the LORD God, was not a fruit of the true Word of God. The things that others were telling him were designed to produce fear, to weaken his hands in the work of God, and to make him afraid to finish the work. In fact, the most often repeated commandment in the Word of God is Be not afraid, Do not fear, and variants.
The fruit of God’s Word, in its exhortation for obedience, is never fear. Fear is from the enemy in order to prevent us from walking, from following, from obeying, from loving, from laying ourselves down. We can trust our God to care for us as we go forward.
Now why would going into the Temple, and closing the doors, be seen by Nehemiah as cause to sin? The Temple’s doors were open to allow worshipers access. This is why there was an entire class of Levites who served as gatekeepers: the doors to the Temple remained open; it was the gatekeepers who prevented access to whomever was not allowed, not closed doors that prevented access.
So if Nehemiah was to go into the Temple for a secret meeting for which there would be no witnesses to affirm Nehemiah’s innocence, and close the doors to prevent access, it could be falsely reported of him that he was conspiring to set himself up as king or something, now that the walls were finished.
Another wise move that Nehemiah made: he did not go to meetings and negotiations with his enemies. When they said jump, he ignored them. When he was accused, he merely said, That is an invention from your own heart, and kept working. God, give Israel such statesmen today in her hour of need!