This is an excerpt from Holinshed's chronicles:

Sir John Bushy ,the King's secretary,read the sentence and determination of the king and his council ,in a long roll,the effect whereof was,that Henry,Duke Hereford should within fifteen days depart out of the realm ,and not to return before the term of ten years were expired ,except  by the king he should be repealed again ,and this upon pain of death;and that Thomas Mowbray ,Duke of Norfolk,because he had sown sedition in the realm by his words , should likewise avoid the realm ,and never to return again into England,nor approach the borders or confines upon pain of death.
What does Upon Pain of death means here?Or what word does it refer to?(I think that the first one is more difficult.)
Hi ColorADay. Welcome to EF.

upon pain of something is a common phrase which means "the something follows imminently if the [condition]"
"You use upon when mentioning an event that is followed immediately by another event. [FORMAL]"

In your case it means "the execution will follow if the return takes place".

Does it help? Emotion: smile
Yes ,Thanks