The idea that souls of the righteous and souls of martyrs have a special place in heaven is found in many sources.
The immortality of martyrs was especially dwelt on by the Essenes:
...that it is life that is a calamity to men, and not death; for this last affords our souls their liberty, and sends them by a removal into their own place of purity, where they are to be insensible of all sorts of misery; for while souls are tied clown to a mortal body, they are partakers of its miseries; and really, to speak the truth, they are themselves dead; for the union of what is divine to what is mortal is disagreeable
...it was a glorious thing to die for the laws of their country; because that the soul was immortal, and that an eternal enjoyment of happiness did await such as died on that account
Similar statements are found also at in Wars ii. 8, §10 and Antiquities xviii. 1, §5). In Wars ii. 8, §14, this view is contrasted with that of the Pharisees, who say "that all souls are incorruptible, but that the souls of good men only are removed into other bodies, but that the souls of bad men are subject to eternal punishment."
Shabbos 152b, p.359 We have learned: R. Eliezer said: "The souls of righteous men are deposited underneath the throne of honor, as it is written: 'Yet will the soul of my lord be bound in the bond of life'; and the souls of the wicked are crowded together until they are crushed, as it is written: 'The souls of thy enemies will he hurl away.'".............
R. A'ha asked Rabh: "Who is the man that will live in the world to come?" He answered by quoting the verse [Isaiah xxx. 21]: "And thy ears shall hear the word behind thee, saying, This is the way; walk ye in it, when ye turn to the right hand and when ye turn to the left." 1 R. Hanina said: "The man who gives satisfaction to our masters."
preexistence According to IV Esdras iv. 41 (comp. Yeb. 62a), they are kept in such cages (גוף) before entering upon earthly existence. The soul of martyrs also have a special place in heaven, according to Enoch (xxii. 12, cii. 4, cviii. 11 et seq.);
whereas the Slavonic Enoch (xxiii. 5) teaches that "every soul was created for eternity before the foundation of the world." This Platonic doctrine of the preexistence of the soul (comp. Wisdom viii. 20; Philo, "De Gigantibus," §§ 3 et seq.; idem, "De Somniis," i., § 22) is taught also by the Rabbis, who spoke of a storehouse of the souls in the seventh heaven ("'Arabot"; Sifre, Deut. 344; Ḥag. 12b). In Gen. R. viii. the souls of the righteous are mentioned as counselors of God at the world's creation (comp. the Fravashi in "Farwardin Yast," in "S. B. E." xxiii. 179).
stay with god Abraham is told by God: "Depart from this vain world; leave the body and go to thy Lord among the good" (Testament of Abraham, i.).
Upon the belief that the soul has a life of its own after death is based the following story: "Said Emperor Antoninus to Judah ha-Nasi, 'Both body and soul could plead guiltless on the day of judgment, as neither sinned without the other.' 'But then,' answered Judah, 'God reunites both for the judgment, holding them both responsible for the sin committed, just as in the fable the blind and the lame are punished in common for aiding each other in stealing the fruit of the orchard'" (Sanh. 91a; Lev. R. iv.). "There is neither eating nor drinking nor any sensual pleasure nor strife in the world to come, but the righteous with their crowns sit around the table of God, feeding upon the splendor of His majesty," said Rab (Ber. 17a), thus insisting that the nature of the soul when freed from the body is purely spiritual, while the common belief loved to dwell upon the banquet prepared for the pious in the world to come (see Eschatology; Leviathan). Hence the saying, "Prepare thyself in the vestibule that thou mayest be admitted into the triclinium"; that is, "Let this world be a preparation for the next" (Ab. iv. 16). The following sayings also indicate a pure conception of the soul's immortality: "The Prophets have spoken only concerning the Messianic future; but concerning the future state of the soul it is said: 'Men have not heard nor perceived by the ear, neither hath the eye seen, O God beside Thee, what He hath prepared for him that waiteth for Him'" (Ber. 34b; comp. I Cor. ii. 9, Greek; Resh, "Agrapha," 1889, p. 154). "When man dies," says R. Meïr, "three sets of angels go forth to welcome him" (Num. R. xii.); this can only refer to the disembodied soul.