The answer to this question -- which recycles the famous phrase of Stephen Greenblatt, commonly seen as the founder of New Historicism -- can be seen clearly, I think, in the methods of that approach.
Rather than read a literary text in isolation or merely as an example of something that has been examined in traditional history of the period in which the literary text was written, the New Historicist pairs the literary text with a non-literary text from the same period. That second text is often called the "co-text" or "cotext." This method of pairing two types of texts -- and refusing to privilege one of the texts over the other -- creates the same mirroring and inverting effect that is seen in the wording of the question: "the historicity of text and the textuality of history."
To be more specific, this method serves to show how the literary text is tied to a historical period (that's the "historicity of the text" part of the question) as well as how the formulation of history is grounded in the ongoing interpretation of texts (that's the "textuality of history" part).
See the links below for more discussion. You may find the cultmatnewhist.blogspot.com site to be very helpful.