- 祭 (제) -- to sacrifice
- 虎 (호) -- tiger
- 以 (이) -- to take
- 爲 (위) -- to be
- 神 (신) -- god
Sacrifice (祭) [to] the tiger (虎) [and] take [it] (以) to be (爲) a god (神).
“以 + N1 + 爲 + N2" is used when you want to say “take N1 to be N2,” where N1 and N2 are two different nouns. For example, 以虎爲神 would translate as “take (以) the tiger (虎) to be (爲) a god (神),” which could also be translated as “regard (以) the tiger (虎) as (爲) a god (神).” However, in the sentence here there was no N1 between 以 and 爲 because 虎 (the tiger) had already been mentioned in the previous clause that said "sacrifice (祭) [to] the tiger (虎)," so the pronoun 之 (it) was used instead to refer back to the tiger.
Now you might be wondering where the 之 is? Well, one of the more interesting grammar rules in liiterary Chinese is that it does not allow you to write a 之 after 以, so when we translate 以爲, we just have to assume there is a 之 between the two characters. Therefore, 以爲 can be translated as “take it (以) to be (爲)” or “regard it (以) as (爲).” If the preceding noun were plural, then, of course, it would translate as “take them (以) to be (爲)” or “regard them (以) as (爲).”